Sha256: 289d4dd049d69f7014a5ec77ee5180b426f17da73e06b94cd1843615e3a4def3

Contents?: true

Size: 302 Bytes

Versions: 16

Compression:

Stored size: 302 Bytes

Contents

module DataMapper
  module LocalObjectSpace
    def self.extended(klass)
      (class << klass; self; end).send :attr_accessor, :hook_scopes
      klass.hook_scopes = []
    end

    def object_by_id(object_id)
      self.hook_scopes.detect { |object| object.object_id == object_id }
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
ardm-core-1.3.0 lib/dm-core/support/local_object_space.rb
ardm-core-1.2.1 lib/dm-core/support/local_object_space.rb
dm-core-1.2.1 lib/dm-core/support/local_object_space.rb
dm-core-1.2.0 lib/dm-core/support/local_object_space.rb
dm-core-1.2.0.rc2 lib/dm-core/support/local_object_space.rb
dm-core-1.2.0.rc1 lib/dm-core/support/local_object_space.rb
dm-core-1.1.0 lib/dm-core/support/local_object_space.rb
dm-core-1.1.0.rc3 lib/dm-core/support/local_object_space.rb
dm-core-1.1.0.rc2 lib/dm-core/support/local_object_space.rb
dm-core-1.1.0.rc1 lib/dm-core/support/local_object_space.rb
dm-core-1.0.2 lib/dm-core/support/local_object_space.rb
dm-core-1.0.1 lib/dm-core/support/local_object_space.rb
dm-core-1.0.0 lib/dm-core/support/local_object_space.rb
dm-core-1.0.0.rc3 lib/dm-core/support/local_object_space.rb
dm-core-1.0.0.rc2 lib/dm-core/support/local_object_space.rb
dm-core-1.0.0.rc1 lib/dm-core/support/local_object_space.rb