Class: Sheetah::Headers::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/sheetah/headers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sheet_header, spec_column) ⇒ Header

Returns a new instance of Header.



13
14
15
16
# File 'lib/sheetah/headers.rb', line 13

def initialize(sheet_header, spec_column)
  @header = sheet_header
  @column = spec_column
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



18
19
20
# File 'lib/sheetah/headers.rb', line 18

def column
  @column
end

#headerObject (readonly)

Returns the value of attribute header.



18
19
20
# File 'lib/sheetah/headers.rb', line 18

def header
  @header
end

Instance Method Details

#==(other) ⇒ Object



20
21
22
23
24
# File 'lib/sheetah/headers.rb', line 20

def ==(other)
  other.is_a?(self.class) &&
    header == other.header &&
    column == other.column
end

#row_value_indexObject



26
27
28
# File 'lib/sheetah/headers.rb', line 26

def row_value_index
  header.row_value_index
end