Class: XGen::Mongo::Driver::Code
- Inherits:
-
String
- Object
- String
- XGen::Mongo::Driver::Code
- Defined in:
- lib/mongo/types/code.rb
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
A new instance of Code.
Constructor Details
#initialize(code, scope = {}) ⇒ Code
Returns a new instance of Code.
26 27 28 29 |
# File 'lib/mongo/types/code.rb', line 26 def initialize(code, scope={}) super(code) @scope = scope end |
Instance Attribute Details
#scope ⇒ Object
Hash mapping identifiers to their values
24 25 26 |
# File 'lib/mongo/types/code.rb', line 24 def scope @scope end |