Sha256: bfe19fbc8ea2cb9722b9b398276366db2d6ccd4b9eb79c290da337e1d42edbd1
Contents?: true
Size: 493 Bytes
Versions: 1
Compression:
Stored size: 493 Bytes
Contents
class YamlDepositRepository < DepositRepository require "yaml/store" class << self def insert(deposit) store.transaction do store["deposit"] = deposit end end def find store.transaction do store["deposit"] end end def update(deposit) store.transaction do store["deposit"] = deposit end end private def store @store ||= YAML::Store.new("#{Dir.home}/.vendra/store.yml") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vendra-0.1.0 | lib/vendra/infrastructure/persistence/deposits/yaml_deposit_repository.rb |