Sha256: 7feb903ea640050b459fce90e4171f1f65bd72c754f716721da116fbf54e2578

Contents?: true

Size: 424 Bytes

Versions: 23

Compression:

Stored size: 424 Bytes

Contents

require 'vedeu/repositories/repository'

module Vedeu

  class RepositoriesTestClass < Repository

    attr_accessor :storage
    alias_method :in_memory, :storage

    def initialize(storage = {})
      @storage = storage
    end

    def add(model)
      if storage.is_a?(Hash)
        @storage = in_memory.merge!(model)

      else
        @storage << model

      end
    end

  end # RepositoriesTestClass

end # Vedeu

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
vedeu-0.4.16 test/support/helpers/repositories.rb
vedeu-0.4.15 test/support/helpers/repositories.rb
vedeu-0.4.14 test/support/helpers/repositories.rb
vedeu-0.4.13 test/support/helpers/repositories.rb
vedeu-0.4.12 test/support/helpers/repositories.rb
vedeu-0.4.11 test/support/helpers/repositories.rb
vedeu-0.4.10 test/support/helpers/repositories.rb
vedeu-0.4.9 test/support/helpers/repositories.rb
vedeu-0.4.8 test/support/helpers/repositories.rb
vedeu-0.4.7 test/support/helpers/repositories.rb
vedeu-0.4.6 test/support/helpers/repositories.rb
vedeu-0.4.5 test/support/helpers/repositories.rb
vedeu-0.4.4 test/support/helpers/repositories.rb
vedeu-0.4.3 test/support/helpers/repositories.rb
vedeu-0.4.2 test/support/helpers/repositories.rb
vedeu-0.4.1 test/support/helpers/repositories.rb
vedeu-0.4.0 test/support/helpers/repositories.rb
vedeu-0.3.5 test/support/helpers/repositories.rb
vedeu-0.3.4 test/support/helpers/repositories.rb
vedeu-0.3.3 test/support/helpers/repositories.rb