Class: TableAnalysis::HeaderTd
- Inherits:
-
Object
- Object
- TableAnalysis::HeaderTd
- Defined in:
- lib/table_analysis/header.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
Returns the value of attribute length.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, length) ⇒ HeaderTd
constructor
A new instance of HeaderTd.
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
#length ⇒ Object
Returns the value of attribute length.
17 18 19 |
# File 'lib/table_analysis/header.rb', line 17 def length @length end |
#name ⇒ Object
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 |