Class: SpreadsheetFuel::Modeling::SheetMapping

Inherits:
Object
  • Object
show all
Defined in:
lib/spreadsheet_fuel/modeling/sheet_mapping.rb

Overview

Connects and maps a sheet name or index to a register name. This can be used in either direction: sheet to register or register to sheet.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(register: Burner::DEFAULT_REGISTER, sheet: nil) ⇒ SheetMapping

Returns a new instance of SheetMapping.



19
20
21
22
23
24
# File 'lib/spreadsheet_fuel/modeling/sheet_mapping.rb', line 19

def initialize(register: Burner::DEFAULT_REGISTER, sheet: nil)
  @register = register.to_s
  @sheet    = sheet

  freeze
end

Instance Attribute Details

#registerObject (readonly)

Returns the value of attribute register.



17
18
19
# File 'lib/spreadsheet_fuel/modeling/sheet_mapping.rb', line 17

def register
  @register
end

#sheetObject (readonly)

Returns the value of attribute sheet.



17
18
19
# File 'lib/spreadsheet_fuel/modeling/sheet_mapping.rb', line 17

def sheet
  @sheet
end