Class: Ledge::Row
- Inherits:
-
Object
- Object
- Ledge::Row
- Defined in:
- lib/ledge/row.rb
Constant Summary collapse
- ROW_TYPES =
{ "heading" => Ledge::RowHeading }
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content) ⇒ Row
constructor
A new instance of Row.
- #render ⇒ Object
Constructor Details
#initialize(content) ⇒ Row
Returns a new instance of Row.
17 18 19 |
# File 'lib/ledge/row.rb', line 17 def initialize content @content = content end |
Class Method Details
.row_from(data) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/ledge/row.rb', line 9 def self.row_from data unless ROW_TYPES[data["type"]].nil? ROW_TYPES[data["type"]].new data["content"] else Ledge::Row.new data["content"] end end |
Instance Method Details
#render ⇒ Object
21 22 23 |
# File 'lib/ledge/row.rb', line 21 def render @content end |