Class: Ledge::RowHeading

Inherits:
Object
  • Object
show all
Defined in:
lib/ledge/row_heading.rb

Instance Method Summary collapse

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

#renderObject



9
10
11
# File 'lib/ledge/row_heading.rb', line 9

def render
  "<#{@heading_type}>#{@text}</#{@heading_type}>"
end