class SimpleCommander::Command::Options

Options struct.

Public Class Methods

new() click to toggle source
# File lib/simple_commander/command.rb, line 14
def initialize
  @table = {}
end

Public Instance Methods

__hash__() click to toggle source
# File lib/simple_commander/command.rb, line 18
def __hash__
  @table
end
default(defaults = {}) click to toggle source
# File lib/simple_commander/command.rb, line 26
def default(defaults = {})
  @table = defaults.merge! @table
end
inspect() click to toggle source
# File lib/simple_commander/command.rb, line 30
def inspect
  "<SimpleCommander::Command::Options #{ __hash__.map { |k, v| "#{k}=#{v.inspect}" }.join(', ') }>"
end
method_missing(meth, *args) click to toggle source
# File lib/simple_commander/command.rb, line 22
def method_missing(meth, *args)
  meth.to_s =~ /=$/ ? @table[meth.to_s.chop.to_sym] = args.first : @table[meth]
end