Parent

Class/Module Index [+]

Quicksearch

DataMapper::Resource::PersistenceState::Clean

a persisted/unmodified resource

Public Instance Methods

commit() click to toggle source
# File lib/dm-core/resource/persistence_state/clean.rb, line 23
def commit
  self
end
delete() click to toggle source
# File lib/dm-core/resource/persistence_state/clean.rb, line 19
def delete
  Deleted.new(resource)
end
rollback() click to toggle source
# File lib/dm-core/resource/persistence_state/clean.rb, line 27
def rollback
  self
end
set(subject, value) click to toggle source
# File lib/dm-core/resource/persistence_state/clean.rb, line 7
def set(subject, value)
  if not_modified?(subject, value)
    self
  else
    # assign to persistence_state so that if Dirty#set calls
    # a Relationship#set, which modifies a Property, the same
    # Dirty state instance will be reused.
    state = resource.persistence_state = Dirty.new(resource)
    state.set(subject, value)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.