class YamlDepositRepository
Public Class Methods
find()
click to toggle source
# File lib/vendra/infrastructure/persistence/deposits/yaml_deposit_repository.rb, line 11 def find store.transaction do store["deposit"] end end
insert(deposit)
click to toggle source
# File lib/vendra/infrastructure/persistence/deposits/yaml_deposit_repository.rb, line 5 def insert(deposit) store.transaction do store["deposit"] = deposit end end
update(deposit)
click to toggle source
# File lib/vendra/infrastructure/persistence/deposits/yaml_deposit_repository.rb, line 17 def update(deposit) store.transaction do store["deposit"] = deposit end end
Private Class Methods
store()
click to toggle source
# File lib/vendra/infrastructure/persistence/deposits/yaml_deposit_repository.rb, line 25 def store @store ||= YAML::Store.new("#{Dir.home}/.vendra/store.yml") end