Class: Storing::Inserter
- Inherits:
-
AbstractInserter
- Object
- AbstractInserter
- Storing::Inserter
- Defined in:
- lib/storing/inserter.rb
Instance Attribute Summary collapse
-
#entity ⇒ Object
readonly
Returns the value of attribute entity.
-
#mapper ⇒ Object
readonly
Returns the value of attribute mapper.
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(entity, mapper, store) ⇒ Inserter
constructor
A new instance of Inserter.
- #insert ⇒ Object
Constructor Details
#initialize(entity, mapper, store) ⇒ Inserter
Returns a new instance of Inserter.
12 13 14 15 16 |
# File 'lib/storing/inserter.rb', line 12 def initialize entity, mapper, store @entity = entity @mapper = mapper @store = store end |
Instance Attribute Details
#entity ⇒ Object (readonly)
Returns the value of attribute entity.
10 11 12 |
# File 'lib/storing/inserter.rb', line 10 def entity @entity end |
#mapper ⇒ Object (readonly)
Returns the value of attribute mapper.
10 11 12 |
# File 'lib/storing/inserter.rb', line 10 def mapper @mapper end |
#store ⇒ Object (readonly)
Returns the value of attribute store.
10 11 12 |
# File 'lib/storing/inserter.rb', line 10 def store @store end |
Class Method Details
.insert(entity, mapper, store) ⇒ Object
6 7 8 |
# File 'lib/storing/inserter.rb', line 6 def self.insert entity, mapper, store new(entity, mapper, store).insert end |
Instance Method Details
#insert ⇒ Object
18 19 20 |
# File 'lib/storing/inserter.rb', line 18 def insert store.insert(data) end |