Sha256: 132d22760556c11c4e4ace7ca0d15cefb9f46978246de649cefe12263118d83c

Contents?: true

Size: 456 Bytes

Versions: 15

Compression:

Stored size: 456 Bytes

Contents

module Coercible
  class Coercer

    # Coerce Symbol values
    class Symbol < Object
      primitive ::Symbol

      # Coerce given value to String
      #
      # @example
      #   coercer[Symbol].to_string(:name)  # => "name"
      #
      # @param [Symbol] value
      #
      # @return [String]
      #
      # @api public
      def to_string(value)
        value.to_s
      end

    end # class Symbol

  end # class Coercer
end # module Coercible

Version data entries

15 entries across 13 versions & 5 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/symbol.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/symbol.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/symbol.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/coercible-1.0.0/lib/coercible/coercer/symbol.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/coercible-1.0.0/lib/coercible/coercer/symbol.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/symbol.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/symbol.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/symbol.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/symbol.rb
coercible-1.0.0 lib/coercible/coercer/symbol.rb
motion_coercible-0.2.0 lib/project/coercer/symbol.rb
coercible-0.2.0 lib/coercible/coercer/symbol.rb
coercible-0.1.0 lib/coercible/coercer/symbol.rb
coercible-0.0.2 lib/coercible/coercer/symbol.rb
coercible-0.0.1 lib/coercible/coercer/symbol.rb