class Storing::Inserter

Attributes

entity[R]
mapper[R]
store[R]

Public Class Methods

insert(entity, mapper, store) click to toggle source
# File lib/storing/inserter.rb, line 6
def self.insert entity, mapper, store
        new(entity, mapper, store).insert
end
new(entity, mapper, store) click to toggle source
# File lib/storing/inserter.rb, line 12
def initialize entity, mapper, store
        @entity = entity
        @mapper = mapper
        @store = store
end

Public Instance Methods

insert() click to toggle source
# File lib/storing/inserter.rb, line 18
def insert
        store.insert(data)
end

Private Instance Methods

data() click to toggle source
# File lib/storing/inserter.rb, line 24
def data
        mapper.dump_to_table(entity, table_name)
end
table_name() click to toggle source
# File lib/storing/inserter.rb, line 28
def table_name
        store.table_name
end