Sha256: ab3fd5b19d970918cc54c3c73e7a93a694797129f4fba2e78b68a22760bd81fd

Contents?: true

Size: 364 Bytes

Versions: 3

Compression:

Stored size: 364 Bytes

Contents

class FasterCSV::Row
  def method_missing(sym,*args,&b)
    if self[sym.to_s] or include?(sym.to_s)
      self[sym.to_s].safe_to_num
    else
      super(sym,*args,&b)
    end
  end
end

class FasterCSV
  def self.each(*args,&b)
    foreach(*args,&b)
  end
end

class Object
  def safe_to_num
    if self =~ /^\d+$/
      to_i
    else
      self
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
GFunk911-dataload-0.9.1 lib/dataload/ext/faster_csv.rb
GFunk911-dataload-0.9.2 lib/dataload/ext/faster_csv.rb
GFunk911-dataload-0.9.4 lib/dataload/ext/faster_csv.rb