Class: Sheetah::Sheet::Header
- Inherits:
-
Object
- Object
- Sheetah::Sheet::Header
- Defined in:
- lib/sheetah/sheet.rb
Instance Attribute Summary collapse
-
#col ⇒ Object
readonly
Returns the value of attribute col.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(col:, value:) ⇒ Header
constructor
A new instance of Header.
- #row_value_index ⇒ Object
Constructor Details
#initialize(col:, value:) ⇒ Header
Returns a new instance of Header.
52 53 54 55 |
# File 'lib/sheetah/sheet.rb', line 52 def initialize(col:, value:) @col = col @value = value end |
Instance Attribute Details
#col ⇒ Object (readonly)
Returns the value of attribute col.
57 58 59 |
# File 'lib/sheetah/sheet.rb', line 57 def col @col end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
57 58 59 |
# File 'lib/sheetah/sheet.rb', line 57 def value @value end |
Instance Method Details
#==(other) ⇒ Object
59 60 61 |
# File 'lib/sheetah/sheet.rb', line 59 def ==(other) other.is_a?(self.class) && col == other.col && value == other.value end |
#row_value_index ⇒ Object
63 64 65 |
# File 'lib/sheetah/sheet.rb', line 63 def row_value_index Sheet.col2int(col) - 1 end |