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