Sha256: a0425254060919ce5b1f3da808c30016a4030ddf0ba26b482092c544107c0fbd

Contents?: true

Size: 378 Bytes

Versions: 38

Compression:

Stored size: 378 Bytes

Contents

module Foobara
  module BuiltinTypes
    module Float
      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)
            integer.to_f
          end
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
foobara-0.0.18 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.17 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.16 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.15 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.14 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.13 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.12 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.11 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.10 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.9 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.8 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.7 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.6 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.5 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.4 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.3 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.2 projects/builtin_types/src/float/casters/integer.rb
foobara-0.0.1 projects/builtin_types/src/float/casters/integer.rb