Class: Spurs::Section::SectionBuilder
- Inherits:
-
BuilderBase
- Object
- BuilderBase
- Spurs::Section::SectionBuilder
- Defined in:
- lib/spurs/section/section_builder.rb
Instance Method Summary collapse
Methods inherited from BuilderBase
Constructor Details
This class inherits a constructor from Spurs::Section::BuilderBase
Instance Method Details
#build_section(title, content) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/spurs/section/section_builder.rb', line 4 def build_section(title,content) r = SecureRandom::hex(5) section_id = "section_#{r}" header_output = build_header(title) body_output = build_body(content) content_tag(:div,header_output.concat(body_output), :class => "spurs_section #{section_id}") end |