Class: Bulma::SubtitleComponent
- Defined in:
- app/components/bulma/subtitle_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(text = nil, size: nil) ⇒ SubtitleComponent
constructor
A new instance of SubtitleComponent.
Constructor Details
#initialize(text = nil, size: nil) ⇒ SubtitleComponent
Returns a new instance of SubtitleComponent.
5 6 7 8 |
# File 'app/components/bulma/subtitle_component.rb', line 5 def initialize(text = nil, size: nil) @text = text @size = size end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'app/components/bulma/subtitle_component.rb', line 10 def call content_tag :p, @text || content, class: class_names("subtitle", "is-#{@size}" => @size.present?) end |