Sha256: 935af6ae7e30ed91fe3bc291d0bdf0a51fe8bc25a7f50d12efe94a71f93b79d8

Contents?: true

Size: 468 Bytes

Versions: 15

Compression:

Stored size: 468 Bytes

Contents

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

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/true_class.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/true_class.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/true_class.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/coercible-1.0.0/lib/coercible/coercer/true_class.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/coercible-1.0.0/lib/coercible/coercer/true_class.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/true_class.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/true_class.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/true_class.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/true_class.rb
coercible-1.0.0 lib/coercible/coercer/true_class.rb
motion_coercible-0.2.0 lib/project/coercer/true_class.rb
coercible-0.2.0 lib/coercible/coercer/true_class.rb
coercible-0.1.0 lib/coercible/coercer/true_class.rb
coercible-0.0.2 lib/coercible/coercer/true_class.rb
coercible-0.0.1 lib/coercible/coercer/true_class.rb