Class: MarkdownTable::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/markdown_table/header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#headerObject (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

#generateObject



11
12
13
# File 'lib/markdown_table/header.rb', line 11

def generate
  "|#{@header.join('|')}|\n"
end