Class: Storing::Updater

Inherits:
AbstractUpdater show all
Defined in:
lib/storing/updater.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractUpdater

#update

Constructor Details

#initialize(entity, mapper, store) ⇒ Updater

Returns a new instance of Updater.



8
9
10
11
12
# File 'lib/storing/updater.rb', line 8

def initialize entity, mapper, store
	@entity = entity
	@mapper = mapper
	@store = store
end

Instance Attribute Details

#entityObject (readonly)

Returns the value of attribute entity.



6
7
8
# File 'lib/storing/updater.rb', line 6

def entity
  @entity
end

#mapperObject (readonly)

Returns the value of attribute mapper.



6
7
8
# File 'lib/storing/updater.rb', line 6

def mapper
  @mapper
end

#storeObject (readonly)

Returns the value of attribute store.



6
7
8
# File 'lib/storing/updater.rb', line 6

def store
  @store
end

Instance Method Details

#insertObject



14
15
16
# File 'lib/storing/updater.rb', line 14

def insert
	store.update(data)
end