class Thor::Options::Hash

simple Hash with indifferent access

def [](key)

def [](key)
  super convert_key(key)
end

def convert_key(key)

def convert_key(key)
  key.kind_of?(Symbol) ? key.to_s : key
end

def initialize(hash)

def initialize(hash)
  super()
  update hash
end

def method_missing(method, *args, &block)

options.force? # => !!options['force']
Magic predicates. For instance:
def method_missing(method, *args, &block)
  method.to_s =~ /^(\w+)\?$/ ? !!self[$1] : super
end

def values_at(*indices)

def values_at(*indices)
  indices.collect { |key| self[convert_key(key)] }
end