Sha256: cce55073dd2938f998080247c2c540e35fd376f2167b67240d606bc327e501ce

Contents?: true

Size: 373 Bytes

Versions: 27

Compression:

Stored size: 373 Bytes

Contents

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

          def applies_message
            "be a String"
          end

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