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.



22
23
24
# File 'lib/mongoid/extensions/raw_value.rb', line 22

def initialize(raw_value)
  @raw_value = raw_value
end

Instance Attribute Details

#raw_valueObject (readonly)

Returns the value of attribute raw_value.



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

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.



30
31
32
# File 'lib/mongoid/extensions/raw_value.rb', line 30

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