class Zold::Args

Command line args

Public Class Methods

new(opts, log) click to toggle source
# File lib/zold/commands/args.rb, line 37
def initialize(opts, log)
  @opts = opts
  @log = log
end

Public Instance Methods

take() click to toggle source
# File lib/zold/commands/args.rb, line 42
def take
  if @opts.help?
    @log.info(@opts.to_s)
    return
  end
  args = @opts.arguments.reject { |a| a.start_with?('-') }
  raise 'Try --help' if args.empty?
  args[1..-1]
end