Class: Kitchen::Directions::BakeFolio::V1::FolioPara
- Defined in:
- lib/kitchen/directions/bake_folio.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #create_para ⇒ Object
-
#initialize(klass:, title:) ⇒ FolioPara
constructor
A new instance of FolioPara.
Constructor Details
#initialize(klass:, title:) ⇒ FolioPara
Returns a new instance of FolioPara.
43 44 45 46 |
# File 'lib/kitchen/directions/bake_folio.rb', line 43 def initialize(klass:, title:) @klass = klass @title = title end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
40 41 42 |
# File 'lib/kitchen/directions/bake_folio.rb', line 40 def klass @klass end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
41 42 43 |
# File 'lib/kitchen/directions/bake_folio.rb', line 41 def title @title end |
Instance Method Details
#create_para ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/kitchen/directions/bake_folio.rb', line 48 def create_para title_label = @title.search('.os-text').first.children @title.append(sibling: <<~HTML.chomp <p class="#{@klass}">#{title_label}</p> HTML ) end |