Method: Spreadsheet::Workbook#worksheet
- Defined in:
- lib/spreadsheet/workbook.rb
#worksheet(idx) ⇒ Object
The Worksheet at idx, or - if idx is a String - the Worksheet with name == idx
91 92 93 94 95 96 97 98 |
# File 'lib/spreadsheet/workbook.rb', line 91 def worksheet idx case idx when Integer @worksheets[idx] when String @worksheets.find do |sheet| sheet.name == idx end end end |