Sha256: 66ad7d151cd4183d91f0bdf675558fc3a200421d30a439640748d811c8a3b604

Contents?: true

Size: 390 Bytes

Versions: 27

Compression:

Stored size: 390 Bytes

Contents

module Foobara
  module BuiltinTypes
    module BigDecimal
      module Casters
        class Integer < Value::Caster
          def applicable?(value)
            value.is_a?(::Integer)
          end

          def applies_message
            "be a an Integer"
          end

          def cast(integer)
            BigDecimal(integer)
          end
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foobara-0.0.7 projects/builtin_types/src/big_decimal/casters/integer.rb
foobara-0.0.6 projects/builtin_types/src/big_decimal/casters/integer.rb
foobara-0.0.5 projects/builtin_types/src/big_decimal/casters/integer.rb
foobara-0.0.4 projects/builtin_types/src/big_decimal/casters/integer.rb
foobara-0.0.3 projects/builtin_types/src/big_decimal/casters/integer.rb
foobara-0.0.2 projects/builtin_types/src/big_decimal/casters/integer.rb
foobara-0.0.1 projects/builtin_types/src/big_decimal/casters/integer.rb