Class: Mongoid::RawValue

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/extensions/raw_value.rb

Overview

Represents a value which cannot be type-casted between Ruby and MongoDB.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_value) ⇒ RawValue

Returns a new instance of RawValue.



19
20
21
# File 'lib/mongoid/extensions/raw_value.rb', line 19

def initialize(raw_value)
  @raw_value = raw_value
end

Instance Attribute Details

#raw_valueObject (readonly)

Returns the value of attribute raw_value.



17
18
19
# File 'lib/mongoid/extensions/raw_value.rb', line 17

def raw_value
  @raw_value
end

Instance Method Details

#inspectString

Returns a string containing a human-readable representation of the object, including the inspection of the underlying value.

Returns:

  • (String)

    The object inspection.



27
28
29
# File 'lib/mongoid/extensions/raw_value.rb', line 27

def inspect
  "RawValue: #{raw_value.inspect}"
end