class Mongoid::Defaults

Public Instance Methods

method_missing(method, *args, &block) click to toggle source
Calls superclass method
# File lib/mongoid/grid_fs.rb, line 221
def method_missing(method, *args, &block)
  case method.to_s
  when /(.*)=/
    key = Regexp.last_match(1)
    val = args.first
    update(key => val)
  else
    key = method.to_s
    super unless key?(key)
    fetch(key)
  end
end