Sha256: 745ca6af90baac10e7c829bf5cbbb7de4f7910eb50855f986e3f242586132408

Contents?: true

Size: 461 Bytes

Versions: 2

Compression:

Stored size: 461 Bytes

Contents

module Vedeu
  module Repository
    def adaptor
      @adaptor ||= Storage.new
    end

    def find(id)
      adaptor.find(klass, id)
    end

    def all
      adaptor.all(klass)
    end

    def query(klass, attribute, value)
      adaptor.query(klass, attribute, value)
    end

    def create(model)
      adaptor.create(model)
    end

    def delete(model)
      adaptor.delete(model)
    end

    def reset
      adaptor.reset(klass)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.0.20 lib/vedeu/repository/repository.rb
vedeu-0.0.19 lib/vedeu/repository/repository.rb