Class: Termtable::Row
- Inherits:
-
Object
- Object
- Termtable::Row
- Defined in:
- lib/termtable/row.rb
Instance Attribute Summary collapse
-
#cells ⇒ Object
readonly
Returns the value of attribute cells.
Instance Method Summary collapse
-
#initialize(row) ⇒ Row
constructor
A new instance of Row.
- #render ⇒ Object
Constructor Details
#initialize(row) ⇒ Row
Returns a new instance of Row.
5 6 7 |
# File 'lib/termtable/row.rb', line 5 def initialize(row) @cells = row.map { |value| Cell.new(value) } end |
Instance Attribute Details
#cells ⇒ Object (readonly)
Returns the value of attribute cells.
3 4 5 |
# File 'lib/termtable/row.rb', line 3 def cells @cells end |
Instance Method Details
#render ⇒ Object
9 10 11 |
# File 'lib/termtable/row.rb', line 9 def render '|' + cells.map(&:render).join('|') << '|' end |