Class: BSON::Code
- Inherits:
-
String
- Object
- String
- BSON::Code
- Defined in:
- lib/bson/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
Wrap code to be evaluated by MongoDB.
Constructor Details
#initialize(code, scope = {}) ⇒ Code
Wrap code to be evaluated by MongoDB.
32 33 34 35 |
# File 'lib/bson/types/code.rb', line 32 def initialize(code, scope={}) super(code) @scope = scope end |
Instance Attribute Details
#scope ⇒ Object
Hash mapping identifiers to their values
25 26 27 |
# File 'lib/bson/types/code.rb', line 25 def scope @scope end |