Sha256: 2c4dfc78df8fdbbe98b45cf87329eccb0ba7e43328adbbdf84e89414d1b6f23d

Contents?: true

Size: 290 Bytes

Versions: 7

Compression:

Stored size: 290 Bytes

Contents

require 'date'
require 'bigdecimal'
require 'bigdecimal/util'
require 'time'

module Dry
  module Types
    module Coercions
      module JSON
        extend Coercions

        def self.to_decimal(input)
          input.to_d unless empty_str?(input)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dry-types-0.9.2 lib/dry/types/coercions/json.rb
dry-types-0.9.1 lib/dry/types/coercions/json.rb
dry-types-0.9.0 lib/dry/types/coercions/json.rb
dry-types-0.8.1 lib/dry/types/coercions/json.rb
dry-types-0.8.0 lib/dry/types/coercions/json.rb
dry-types-0.7.2 lib/dry/types/coercions/json.rb
dry-types-0.7.1 lib/dry/types/coercions/json.rb