Module: FromHash
- Included in:
- MongoScope::EqScope, MongoScope::Scope, MongoScope::ScopedCursor
- Defined in:
- lib/mongo_scope/util.rb
Instance Method Summary collapse
Instance Method Details
#from_hash(ops) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/mongo_scope/util.rb', line 2 def from_hash(ops) ops.each do |k,v| send("#{k}=",v) end self end |
#initialize(ops = {}) ⇒ Object
8 9 10 |
# File 'lib/mongo_scope/util.rb', line 8 def initialize(ops={}) from_hash(ops) end |