Class: Store::Repo

Inherits:
Object
  • Object
show all
Defined in:
lib/store/repo.rb

Instance Method Summary collapse

Constructor Details

#initialize(entity_classes, data_mapping, entity_mapping) ⇒ Repo

Returns a new instance of Repo.



5
6
7
# File 'lib/store/repo.rb', line 5

def initialize(entity_classes, data_mapping, entity_mapping)
  @store = Store.new(entity_classes, data_mapping, entity_mapping)
end

Instance Method Details

#build(entity, *args) ⇒ Object



9
10
11
# File 'lib/store/repo.rb', line 9

def build(entity, *args)
  @store.build(entity, *args)
end

#remove(entity) ⇒ Object



18
19
20
21
# File 'lib/store/repo.rb', line 18

def remove(entity)
  @store.remove(entity)
  true
end

#save(entites) ⇒ Object



13
14
15
16
# File 'lib/store/repo.rb', line 13

def save(entites)
  @store.save(entites)
  true
end