class Commander::Command::Options
Options struct.
Public Class Methods
new()
click to toggle source
# File lib/commander/command.rb, line 16 def initialize @table = {} end
Public Instance Methods
__hash__()
click to toggle source
# File lib/commander/command.rb, line 20 def __hash__ @table end
default(defaults = {})
click to toggle source
# File lib/commander/command.rb, line 28 def default defaults = {} @table = defaults.merge! @table end
inspect()
click to toggle source
# File lib/commander/command.rb, line 32 def inspect "<Commander::Command::Options #{ __hash__.map { |k,v| "#{k}=#{v.inspect}" }.join(', ') }>" end
method_missing(meth, *args, &block)
click to toggle source
# File lib/commander/command.rb, line 24 def method_missing meth, *args, &block meth.to_s =~ /=$/ ? @table[meth.to_s.chop.to_sym] = args.first : @table[meth] end