Class: Blogo::DestroyPostService

Inherits:
BasePostService show all
Defined in:
app/services/blogo/destroy_post_service.rb

Constant Summary

Constants inherited from BasePostService

BasePostService::JUMP_BREAK

Instance Method Summary collapse

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!
  clear_tags!
  @post.destroy!
  true
end