def format idx
      case idx
      when Integer
        @formats[idx] || @default_format || Format.new
      when String
        @formats.find do |fmt| fmt.name == idx end
      end
    end
def format idx
      case idx
      when Integer
        @formats[idx] || @default_format || Format.new
      when String
        @formats.find do |fmt| fmt.name == idx end
      end
    end
def format idx case idx when Integer @formats [ idx ] || @default_format || Format . new when String @formats . find do | fmt | fmt . name == idx end end end
The Format at _idx_, or - if _idx_ is a String -
 the Format with name == _idx_
The Format at _idx_ or - if _idx_ is a String - the Format with name == _idx_