Class: Sp2db::Spreadsheet
- Inherits:
-
Object
- Object
- Sp2db::Spreadsheet
- Defined in:
- lib/sp2db/spreadsheet.rb
Instance Attribute Summary collapse
-
#sheet ⇒ Object
Returns the value of attribute sheet.
Instance Method Summary collapse
-
#initialize(sheet) ⇒ Spreadsheet
constructor
A new instance of Spreadsheet.
- #worksheet_by_name(ws_name) ⇒ Object
- #worksheets ⇒ Object
Constructor Details
#initialize(sheet) ⇒ Spreadsheet
Returns a new instance of Spreadsheet.
6 7 8 |
# File 'lib/sp2db/spreadsheet.rb', line 6 def initialize sheet self.sheet = sheet end |
Instance Attribute Details
#sheet ⇒ Object
Returns the value of attribute sheet.
4 5 6 |
# File 'lib/sp2db/spreadsheet.rb', line 4 def sheet @sheet end |
Instance Method Details
#worksheet_by_name(ws_name) ⇒ Object
14 15 16 |
# File 'lib/sp2db/spreadsheet.rb', line 14 def worksheet_by_name ws_name sheet.worksheet_by_title ws_name end |
#worksheets ⇒ Object
10 11 12 |
# File 'lib/sp2db/spreadsheet.rb', line 10 def worksheets sheet.worksheets.index_by(&:title).with_indifferent_access end |