lib/excelfile/table.rb in rubyfromexcel-0.0.13 vs lib/excelfile/table.rb in rubyfromexcel-0.0.16
- old
+ new
@@ -45,10 +45,12 @@
@column_names = {}
column_name_array.each_with_index do |name,index|
@column_names[name.strip.downcase] = index # column['id'].to_i
end
Table.add(self)
- RubyFromExcel.debug(:tables,"#{worksheet.name}.#{name} -> Table #{reference.inspect},#{column_name_array.inspect},#{number_of_total_rows}")
+ if $DEBUG
+ RubyFromExcel.debug(:tables,"#{worksheet.name}.#{name} -> Table #{reference.inspect},#{column_name_array.inspect},#{number_of_total_rows}")
+ end
end
def column(name)
name = $1 if name.to_s =~ /^(\d+)\.0+$/
return :na unless column = column_names[name.to_s.downcase]
\ No newline at end of file