Sha256: e0249064d0775247ef8701b3d80d658c84d0f604a043d2613887efe508aeec88

Contents?: true

Size: 320 Bytes

Versions: 2

Compression:

Stored size: 320 Bytes

Contents

module MemoryModel::Base::Versionable

  def versions
    instances = self.class.collection.records.select { |i| i.id == self.id }
    instances.reduce({ }) do |hash, instance|
      hash[instance.version] = instance
      hash
    end
  end

  def version
    @version
  end

end

# MemoryModel::Base::Immutable # todo!

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
memory_model-0.0.2 lib/memory_model/base/versionable.rb
memory_model-0.0.1 lib/memory_model/base/versionable.rb