lib/spreadsheet/workbook.rb
def worksheet idx
      case idx
      when Integer
        @worksheets[idx]
      when String
        @worksheets.find do |sheet| sheet.name == idx end
      end
    end
def worksheet idx
      case idx
      when Integer
        @worksheets[idx]
      when String
        @worksheets.find do |sheet| sheet.name == idx end
      end
    end
def worksheet idx case idx when Integer @worksheets [ idx ] when String @worksheets . find do | sheet | sheet . name == idx end end end
The Worksheet at _idx_, or - if _idx_ is a String -
 the Worksheet with name == _idx_
The Worksheet at _idx_ or - if _idx_ is a String - the Worksheet with name == _idx_