Sha256: be6165ec6fd2d71fc5b54589edc6a08b2e4e20a5f715be6115eff8525754fd82

Contents?: true

Size: 434 Bytes

Versions: 3

Compression:

Stored size: 434 Bytes

Contents

# encoding: utf-8

module ROM
  class Session
    class State

      # @api private
      class Created < self
        include Concord::Public.new(:object, :mapper, :relation), Adamantium::Flat

        # @api private
        def commit
          relation.insert(object)
          mapper.store_in_identity_map(object)
          Persisted.new(object, mapper)
        end

      end # Created

    end # State
  end # Session
end # ROM

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
rom-0.2.0 lib/rom/session/state/created.rb
rom-session-0.1.1 lib/rom/session/state/created.rb
rom-session-0.1.0 lib/rom/session/state/created.rb