Sha256: e982dab7ef952023c747ca6f411b3c1c32228b82b4c6cd4d55c9c6b5e46f3878

Contents?: true

Size: 374 Bytes

Versions: 27

Compression:

Stored size: 374 Bytes

Contents

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

          def applies_message
            "be a Numeric"
          end

          def cast(string)
            string.to_s
          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/string/casters/numeric.rb
foobara-0.0.6 projects/builtin_types/src/string/casters/numeric.rb
foobara-0.0.5 projects/builtin_types/src/string/casters/numeric.rb
foobara-0.0.4 projects/builtin_types/src/string/casters/numeric.rb
foobara-0.0.3 projects/builtin_types/src/string/casters/numeric.rb
foobara-0.0.2 projects/builtin_types/src/string/casters/numeric.rb
foobara-0.0.1 projects/builtin_types/src/string/casters/numeric.rb