Method: Spreadsheet::Workbook#format

Defined in:
lib/spreadsheet/workbook.rb

#format(idx) ⇒ Object

The Format at idx, or - if idx is a String - the Format with name == idx



66
67
68
69
70
71
72
73
# File 'lib/spreadsheet/workbook.rb', line 66

def format idx
  case idx
  when Integer
    @formats[idx] || @default_format
  when String
    @formats.find do |fmt| fmt.name == idx end
  end
end