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.



10
11
12
13
# File 'lib/sheetah/headers.rb', line 10

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

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



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

def column
  @column
end

#headerObject (readonly)

Returns the value of attribute header.



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

def header
  @header
end

Instance Method Details

#==(other) ⇒ Object



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

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

#row_value_indexObject



23
24
25
# File 'lib/sheetah/headers.rb', line 23

def row_value_index
  header.row_value_index
end