Class: Olivander::Components::PostComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/olivander/components/post_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(poster, posted, updated, text: nil, id: nil, avatar_url: nil) ⇒ PostComponent

Returns a new instance of PostComponent.



9
10
11
12
13
14
15
16
17
# File 'app/components/olivander/components/post_component.rb', line 9

def initialize(poster, posted, updated, text: nil, id: nil, avatar_url: nil)
  super
  @poster = poster
  @posted = posted
  @updated = updated
  @text = text
  @id = id
  @avatar_url = avatar_url
end