Class: Mongo::Code
- Inherits:
-
String
- Object
- String
- Mongo::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.
24 25 26 27 |
# File 'lib/mongo/types/code.rb', line 24 def initialize(code, scope={}) super(code) @scope = scope end |
Instance Attribute Details
#scope ⇒ Object
Hash mapping identifiers to their values
22 23 24 |
# File 'lib/mongo/types/code.rb', line 22 def scope @scope end |