Class: Bs5::Modal::HeaderComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/bs5/modal/header_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title: nil, label_id: nil) ⇒ HeaderComponent

Returns a new instance of HeaderComponent.



8
9
10
11
# File 'app/components/bs5/modal/header_component.rb', line 8

def initialize(title: nil, label_id: nil)
  @title = title
  @label_id = label_id
end

Instance Attribute Details

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'app/components/bs5/modal/header_component.rb', line 6

def title
  @title
end

Instance Method Details

#contentObject



13
14
15
# File 'app/components/bs5/modal/header_component.rb', line 13

def content
  title || @content
end