Class: Ledge::RowHeading
- Inherits:
-
Object
- Object
- Ledge::RowHeading
- Defined in:
- lib/ledge/row_heading.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ RowHeading
constructor
A new instance of RowHeading.
- #render ⇒ Object
Constructor Details
#initialize(data) ⇒ RowHeading
Returns a new instance of RowHeading.
3 4 5 6 7 |
# File 'lib/ledge/row_heading.rb', line 3 def initialize data content = JSON.parse data @heading_type = content["type"] @text = content["text"] end |
Instance Method Details
#render ⇒ Object
9 10 11 |
# File 'lib/ledge/row_heading.rb', line 9 def render "<#{@heading_type}>#{@text}</#{@heading_type}>" end |