Class: Pressy::LocalChangeset::DeletedPost
- Inherits:
-
Object
- Object
- Pressy::LocalChangeset::DeletedPost
- Defined in:
- lib/pressy/changeset/local.rb
Querying the Changes collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#post ⇒ Object
readonly
Returns the value of attribute post.
Querying the Changes collapse
- #==(other) ⇒ Object
- #execute(store) ⇒ Object
-
#initialize(id, post) ⇒ DeletedPost
constructor
A new instance of DeletedPost.
- #type ⇒ Object
Constructor Details
#initialize(id, post) ⇒ DeletedPost
Returns a new instance of DeletedPost
136 137 138 139 |
# File 'lib/pressy/changeset/local.rb', line 136 def initialize(id, post) @id = id @post = post end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id
134 135 136 |
# File 'lib/pressy/changeset/local.rb', line 134 def id @id end |
#post ⇒ Object (readonly)
Returns the value of attribute post
134 135 136 |
# File 'lib/pressy/changeset/local.rb', line 134 def post @post end |
Instance Method Details
#==(other) ⇒ Object
149 150 151 |
# File 'lib/pressy/changeset/local.rb', line 149 def ==(other) post == other.post end |
#execute(store) ⇒ Object
141 142 143 |
# File 'lib/pressy/changeset/local.rb', line 141 def execute(store) store.delete(id, post) end |
#type ⇒ Object
145 146 147 |
# File 'lib/pressy/changeset/local.rb', line 145 def type :delete end |