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.26.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.25.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.24.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.23.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.22.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.21.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.20.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.19.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.18.1 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.18.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.17.3 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.17.2 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.17.1 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.17.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.16.1 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.16.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.15.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.14.1 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.14.0 lib/fe_core_ext/core_ext/csv.rb
fe_core_ext-0.13.1 lib/fe_core_ext/core_ext/csv.rb