class PSP::Toolchain::Application
Attributes
logger[R]
options[R]
Public Class Methods
new()
click to toggle source
# File lib/psp/toolchain/application.rb, line 22 def initialize @logger = Logger.new(STDOUT) parse_options end
Public Instance Methods
start()
click to toggle source
# File lib/psp/toolchain/application.rb, line 28 def start end
Protected Instance Methods
parse_options()
click to toggle source
# File lib/psp/toolchain/application.rb, line 34 def parse_options options = Slop.parse strict: true, help: true, ignore_case: true do banner 'Usage: psp-toolchain [options]' on :p, :prefix=, 'The output directory for the toolchain', required: true on :f, :force, 'Force the installation of the toolchain into the -p directory' on :v, :verbose, 'Enable verbosity' end prefix = Errors::InvalidPrefix.check(options) @options = options.to_hash.merge(prefix: prefix) rescue Error, Slop::Error => error logger.error(error.to_s) exit end