Class BSON::Code
In: lib/bson/types/code.rb
Parent: Object

JavaScript code to be evaluated by MongoDB.

Methods

==   inspect   length   new   to_bson_code  

Attributes

code  [RW]  Hash mapping identifiers to their values
scope  [RW]  Hash mapping identifiers to their values

Public Class methods

Wrap code to be evaluated by MongoDB.

@param [String] code the JavaScript code. @param [Hash] a document mapping identifiers to values, which

  represent the scope in which the code is to be executed.

Public Instance methods

[Validate]