class Object

Public Instance Methods

method_missing(method, *args, &block) click to toggle source
# File lib/choices/rails.rb, line 41
def method_missing(method, *args, &block)
  if method.to_s =~ %r=$/ or (method.to_s =~ %r\?$/ and @choices.key?($`))
    @choices.send(method, *args)
  elsif @choices.key?(method)
    @choices[method]
  else
    super
  end
end
respond_to?(method) click to toggle source
# File lib/choices/rails.rb, line 35
def respond_to?(method)
  super or method.to_s =~ %r=$/ or (method.to_s =~ %r\?$/ and @choices.key?($`))
end