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)
-
- (Object) instance
readonly
Returns the value of attribute instance.
Instance Method Summary (collapse)
-
- (Store) initialize(instance)
constructor
A new instance of Store.
- - (Object) inspect
Methods included from Mongo
#from_mongo!, #load!, #to_mongo
Methods included from Typecasting
#[]=, #before_type_cast, #has?
Constructor Details
- (Store) initialize(instance)
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
- (Object) instance (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
- (Object) inspect
18 19 20 |
# File 'lib/mongomodel/attributes/store.rb', line 18 def inspect "{#{map { |k, v| "#{k.inspect}=>#{v.inspect}"}.join(', ')}}" end |