All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gems.coercible-1.0.0.lib.coercible.coercer.true_class.rb Maven / Gradle / Ivy

The newest version!
module Coercible
  class Coercer

    # Coerce true values
    class TrueClass < Object
      primitive ::TrueClass

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

    end # class TrueClass

  end # class Coercer
end # module Coercible




© 2015 - 2025 Weber Informatics LLC | Privacy Policy