module DataMapper::Is::ReadOnly::InstanceMethods
Public Instance Methods
persistence_state()
click to toggle source
Overrides the default ‘persistence_state` method, to always use {DataMapper::Is::ReadOnly::State}.
@return [DataMapper::Is::ReadOnly::State]
The read-only state.
@since 0.3.0
# File lib/dm-is-read_only/is/read_only.rb, line 79 def persistence_state @_persistence_state ||= DataMapper::Is::ReadOnly::State.new(self) end
persistence_state=(new_state)
click to toggle source
Prevents the persistence state from forcibly being changed.
@param [DataMapper::Resource::State] new_state
The new state to use.
@return [DataMapper::Is::ReadOnly::State]
Always returns the read-only state.
@since 0.3.0
# File lib/dm-is-read_only/is/read_only.rb, line 94 def persistence_state=(new_state) persistence_state end