Class: Mongo::Code
Overview
JavaScript code to be evaluated by MongoDB.
Instance Attribute Summary collapse
-
#scope ⇒ Object
Hash mapping identifiers to their values.
Instance Method Summary collapse
-
#initialize(code, scope = {}) ⇒ Code
constructor
Wrap code to be evaluated by MongoDB.
Constructor Details
#initialize(code, scope = {}) ⇒ Code
Wrap code to be evaluated by MongoDB.
30 31 32 33 |
# File 'lib/mongo/types/code.rb', line 30 def initialize(code, scope={}) super(code) @scope = scope end |
Instance Attribute Details
#scope ⇒ Object
Hash mapping identifiers to their values
23 24 25 |
# File 'lib/mongo/types/code.rb', line 23 def scope @scope end |