Sha256: c604094e7f08f872572fe40f022ddbd235deb3ca6ed20435b2a6a592ea2d87a5

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 Bytes

Contents

module Virtus
  module Typecast

    # Typecast any object to a string
    class String

      # Typecast value to a string
      #
      # @example
      #   Virtus::Typecast::String.call(1)  # => '1'
      #   Virtus::Typecast::String.call([]) # => '[]'
      #
      # @param [Object] value
      #
      # @return [String]
      #
      # @api public
      def self.call(value)
        value.to_s
      end

    end # class String
  end # module Typecast
end # module Virtus

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
virtus-0.0.4 lib/virtus/typecast/string.rb