Class: MongoScope::Scope
- Inherits:
-
Object
- Object
- MongoScope::Scope
- Includes:
- FromHash
- Defined in:
- lib/mongo_scope.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
-
#op ⇒ Object
Returns the value of attribute op.
-
#val ⇒ Object
Returns the value of attribute val.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from FromHash
Instance Attribute Details
#field ⇒ Object
Returns the value of attribute field.
109 110 111 |
# File 'lib/mongo_scope.rb', line 109 def field @field end |
#op ⇒ Object
Returns the value of attribute op.
109 110 111 |
# File 'lib/mongo_scope.rb', line 109 def op @op end |
#val ⇒ Object
Returns the value of attribute val.
109 110 111 |
# File 'lib/mongo_scope.rb', line 109 def val @val end |
Class Method Details
.new(ops) ⇒ Object
106 107 108 |
# File 'lib/mongo_scope.rb', line 106 def self.new(ops) ops.respond_to?(:find_ops) ? ops : super(ops) end |
Instance Method Details
#find_ops ⇒ Object
111 112 113 |
# File 'lib/mongo_scope.rb', line 111 def find_ops {field => {op => val}} end |