Class: ROM::Session::State Private
- Inherits:
-
Object
- Object
- ROM::Session::State
- Defined in:
- lib/rom/session/state.rb,
lib/rom/session/state/created.rb,
lib/rom/session/state/deleted.rb,
lib/rom/session/state/updated.rb,
lib/rom/session/state/persisted.rb,
lib/rom/session/state/transient.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: Created, Deleted, Persisted, Transient, Updated
Constant Summary collapse
- TransitionError =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Class.new(StandardError)
Instance Method Summary collapse
- #created? ⇒ Boolean private
- #delete ⇒ Object private
- #deleted? ⇒ Boolean private
- #persisted? ⇒ Boolean private
- #save ⇒ Object private
- #transient? ⇒ Boolean private
- #updated? ⇒ Boolean private
Instance Method Details
#created? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 |
# File 'lib/rom/session/state.rb', line 28 def created? instance_of?(Created) end |
#delete ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/rom/session/state.rb', line 18 def delete(*) raise TransitionError, "cannot delete object with #{self.class} state" end |
#deleted? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/rom/session/state.rb', line 43 def deleted? instance_of?(Deleted) end |
#persisted? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 |
# File 'lib/rom/session/state.rb', line 33 def persisted? instance_of?(Persisted) end |
#save ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 |
# File 'lib/rom/session/state.rb', line 13 def save(*) raise TransitionError, "cannot save object with #{self.class} state" end |
#transient? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/rom/session/state.rb', line 23 def transient? instance_of?(Transient) end |
#updated? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 |
# File 'lib/rom/session/state.rb', line 38 def updated? instance_of?(Updated) end |