Class: SpreadsheetFuel::Modeling::SheetMapping
- Inherits:
-
Object
- Object
- SpreadsheetFuel::Modeling::SheetMapping
- 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
-
#register ⇒ Object
readonly
Returns the value of attribute register.
-
#sheet ⇒ Object
readonly
Returns the value of attribute sheet.
Instance Method Summary collapse
-
#initialize(register: Burner::DEFAULT_REGISTER, sheet: nil) ⇒ SheetMapping
constructor
A new instance of SheetMapping.
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
#register ⇒ Object (readonly)
Returns the value of attribute register.
17 18 19 |
# File 'lib/spreadsheet_fuel/modeling/sheet_mapping.rb', line 17 def register @register end |
#sheet ⇒ Object (readonly)
Returns the value of attribute sheet.
17 18 19 |
# File 'lib/spreadsheet_fuel/modeling/sheet_mapping.rb', line 17 def sheet @sheet end |