Class: Blogo::DestroyPostService
- Inherits:
-
BasePostService
- Object
- BasePostService
- Blogo::DestroyPostService
- Defined in:
- app/services/blogo/destroy_post_service.rb
Constant Summary
Constants inherited from BasePostService
Instance Method Summary collapse
- #destroy! ⇒ Object
-
#initialize(post) ⇒ DestroyPostService
constructor
A new instance of DestroyPostService.
Constructor Details
#initialize(post) ⇒ DestroyPostService
Returns a new instance of DestroyPostService.
3 4 5 |
# File 'app/services/blogo/destroy_post_service.rb', line 3 def initialize(post) @post = post end |
Instance Method Details
#destroy! ⇒ Object
7 8 9 10 11 |
# File 'app/services/blogo/destroy_post_service.rb', line 7 def destroy! @post.destroy! true end |