Class: TableAnalysis::HeaderTd

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, length) ⇒ HeaderTd

Returns a new instance of HeaderTd.



19
20
21
22
# File 'lib/table_analysis/header.rb', line 19

def initialize(name, length)
  @name = name.delete('\n').strip
  @length = length.nil? ? 1 : length.to_i
end

Instance Attribute Details

#lengthObject

Returns the value of attribute length.



17
18
19
# File 'lib/table_analysis/header.rb', line 17

def length
  @length
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/table_analysis/header.rb', line 17

def name
  @name
end

Class Method Details

.config(name, length) ⇒ Object



24
25
26
# File 'lib/table_analysis/header.rb', line 24

def self.config(name, length)
  new(name, length)
end