Class: Roo::Excelx::Workbook::Label

Inherits:
Object
  • Object
show all
Defined in:
lib/roo/excelx/workbook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, sheet, row, col) ⇒ Label

Returns a new instance of Label.



9
10
11
12
13
14
# File 'lib/roo/excelx/workbook.rb', line 9

def initialize(name, sheet, row, col)
  @name = name
  @sheet = sheet
  @row = row.to_i
  @col = ::Roo::Utils.letter_to_number(col)
end

Instance Attribute Details

#colObject (readonly)

Returns the value of attribute col.



7
8
9
# File 'lib/roo/excelx/workbook.rb', line 7

def col
  @col
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/roo/excelx/workbook.rb', line 7

def name
  @name
end

#rowObject (readonly)

Returns the value of attribute row.



7
8
9
# File 'lib/roo/excelx/workbook.rb', line 7

def row
  @row
end

#sheetObject (readonly)

Returns the value of attribute sheet.



7
8
9
# File 'lib/roo/excelx/workbook.rb', line 7

def sheet
  @sheet
end

Instance Method Details

#keyObject



16
17
18
# File 'lib/roo/excelx/workbook.rb', line 16

def key
  [@row, @col]
end