Class: MarkdownTable::Row
- Inherits:
-
Object
- Object
- MarkdownTable::Row
- Defined in:
- lib/markdown_table/row.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(fields:) ⇒ Row
constructor
A new instance of Row.
Constructor Details
#initialize(fields:) ⇒ Row
Returns a new instance of Row.
7 8 9 |
# File 'lib/markdown_table/row.rb', line 7 def initialize(fields:) @fields = fields end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
5 6 7 |
# File 'lib/markdown_table/row.rb', line 5 def fields @fields end |
Instance Method Details
#generate ⇒ Object
11 12 13 |
# File 'lib/markdown_table/row.rb', line 11 def generate "|#{@fields.join('|')}|\n" end |