Sha256: 180b1d851d3fdfeefb2883c2c29ae9b5dc1c27328ca12af337a720e196472ede

Contents?: true

Size: 304 Bytes

Versions: 78

Compression:

Stored size: 304 Bytes

Contents

require 'bigdecimal'
require 'bigdecimal/util'
require 'csv'

module FeCoreExt::CoreExt
end

module FeCoreExt::CoreExt::CSV

end

class CSV
  #include FeCoreExt::CoreExt::CSV
  Converters[:decimal] = lambda do |field|
    begin
      Float(field)
      field.to_d
    rescue
      field
    end
  end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
fe_core_ext-0.1.48 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.47 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.46 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.45 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.44 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.43 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.42 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.41 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.40 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.39 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.38 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.37 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.36 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.35 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.34 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.33 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.32 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.31 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.30 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.1.29 lib/fe_core_ext/core_ext/csv.rb