Class: MongoModel::Attributes::Store
- Inherits:
-
ActiveSupport::OrderedHash
- Object
- ActiveSupport::OrderedHash
- MongoModel::Attributes::Store
- Includes:
- Mongo, Typecasting
- Defined in:
- lib/mongomodel/attributes/store.rb
Instance Attribute Summary collapse
-
#instance ⇒ Object
readonly
Returns the value of attribute instance.
Instance Method Summary collapse
-
#initialize(instance) ⇒ Store
constructor
A new instance of Store.
- #inspect ⇒ Object
Methods included from Mongo
#from_mongo!, #load!, #to_mongo
Methods included from Typecasting
#[]=, #before_type_cast, #has?
Constructor Details
#initialize(instance) ⇒ Store
Returns a new instance of Store.
12 13 14 15 16 |
# File 'lib/mongomodel/attributes/store.rb', line 12 def initialize(instance) super() @instance = instance set_defaults! end |
Instance Attribute Details
#instance ⇒ Object (readonly)
Returns the value of attribute instance.
9 10 11 |
# File 'lib/mongomodel/attributes/store.rb', line 9 def instance @instance end |
Instance Method Details
#inspect ⇒ Object
18 19 20 |
# File 'lib/mongomodel/attributes/store.rb', line 18 def inspect "{#{map { |k, v| "#{k.inspect}=>#{v.inspect}"}.join(', ')}}" end |