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