Sha256: 1fbfe164e18f26ea6f962e11c55fcb107eab8b06563a5857c99cb5ac89118978

Contents?: true

Size: 465 Bytes

Versions: 18

Compression:

Stored size: 465 Bytes

Contents

module Virtus
  class Coercion

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

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

    end # class Symbol
  end # class Coercion
end # module Virtus

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
virtus-0.5.5 lib/virtus/coercion/symbol.rb
virtus-0.5.4 lib/virtus/coercion/symbol.rb
virtus-0.5.3 lib/virtus/coercion/symbol.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/virtus-0.5.2/lib/virtus/coercion/symbol.rb
virtus-0.5.2 lib/virtus/coercion/symbol.rb
virtus-0.5.1 lib/virtus/coercion/symbol.rb
virtus-0.5.0 lib/virtus/coercion/symbol.rb
virtus-0.4.2 lib/virtus/coercion/symbol.rb
virtus-0.4.1 lib/virtus/coercion/symbol.rb
virtus-0.4.0 lib/virtus/coercion/symbol.rb
virtus-0.3.0 lib/virtus/coercion/symbol.rb
virtus-0.2.0 lib/virtus/coercion/symbol.rb
virtus-0.1.0 lib/virtus/coercion/symbol.rb
virtus-0.0.10 lib/virtus/coercion/symbol.rb
virtus-0.0.9 lib/virtus/coercion/symbol.rb
virtus-0.0.8 lib/virtus/coercion/symbol.rb
virtus-0.0.7 lib/virtus/coercion/symbol.rb
virtus-0.0.6 lib/virtus/coercion/symbol.rb