Coercer object
@example
coercer = Coercible::Coercer.new coercer[String].to_boolean('yes') # => true coercer[Integer].to_string(1) # => '1'
@api public
coercers | [R] |
Return coercer instances
@return [Array<Coercer::Object>] @api private |
config | [R] |
Returns global configuration for coercers
@return [Configuration] @api private |
Initialize a new coercer instance
@param [Hash] coercers
@param [Configuration] config
@return [undefined]
@api private
Build a new coercer
@example
Coercible::Coercer.new { |config| # set configuration }
@yieldparam [Configuration]
@return [Coercer]
@api public
Access a specific coercer object for the given type
@example
coercer[String] # => string coercer coercer[Integer] # => integer coercer
@param [Class] type
@return [Coercer::Object]
@api public