Class: Riagent::Persistence::PersistenceStrategy
- Inherits:
-
Object
- Object
- Riagent::Persistence::PersistenceStrategy
- Defined in:
- lib/riagent/persistence/persistence_strategy.rb
Overview
Riagent document persistence strategy
Direct Known Subclasses
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#collection_name ⇒ Object
Returns the value of attribute collection_name.
-
#model_class ⇒ Object
Returns the value of attribute model_class.
Instance Method Summary collapse
-
#initialize(model_class) ⇒ PersistenceStrategy
constructor
A new instance of PersistenceStrategy.
Constructor Details
#initialize(model_class) ⇒ PersistenceStrategy
Returns a new instance of PersistenceStrategy.
29 30 31 32 |
# File 'lib/riagent/persistence/persistence_strategy.rb', line 29 def initialize(model_class) self.model_class = model_class self.collection_name = model_class.collection_name end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
25 26 27 |
# File 'lib/riagent/persistence/persistence_strategy.rb', line 25 def client @client end |
#collection_name ⇒ Object
Returns the value of attribute collection_name.
26 27 28 |
# File 'lib/riagent/persistence/persistence_strategy.rb', line 26 def collection_name @collection_name end |
#model_class ⇒ Object
Returns the value of attribute model_class.
27 28 29 |
# File 'lib/riagent/persistence/persistence_strategy.rb', line 27 def model_class @model_class end |