Class: Crowdblog::PostPresenter

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/presenters/crowdblog/post_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(object, user) ⇒ PostPresenter

Returns a new instance of PostPresenter.



3
4
5
6
# File 'app/presenters/crowdblog/post_presenter.rb', line 3

def initialize(object, user)
  @user = user
  super(object)
end

Instance Method Details

#publish_as_publisherObject



8
9
10
11
# File 'app/presenters/crowdblog/post_presenter.rb', line 8

def publish_as_publisher
  self.publisher = @user
  super
end