Method: Mongo.delegate_option

Defined in:
lib/mongo.rb

.delegate_option(obj, opt) ⇒ Object

Delegate the given option along with its = and ? methods to the given object.

Parameters:

  • obj (Object)

    The object to delegate to.

  • opt (Symbol)

    The method to delegate.



95
96
97
# File 'lib/mongo.rb', line 95

def self.delegate_option(obj, opt)
  def_delegators obj, opt, "#{opt}=", "#{opt}?"
end