lib/garcon/chef/coerce/coercer.rb
# Registers a coercion with the Garcon library.
#
# @param [Class] origin
#   The class to convert.
#
# @param [Class] target
#   What the origin will be converted to.
#
Registers a coercion with the Garcon library.
Registers a coercion with the Garcon library .
def register(origin, target, &block)
      raise(ArgumentError, 'block is required') unless block_given?
      @mutex.synchronize do
        @coercions[origin][target] = Coercion.new(origin, target, &block)
      end
    end
def register ( origin , target , & block ) raise ( ArgumentError , 'block is required' ) unless block_given? @mutex . synchronize do @coercions [ origin ] [ target ] = Coercion . new ( origin , target , & block ) end end
Registers a coercion with the Garcon library.
Registers a coercion with the Garcon library .
origin
<not_specific>
target
<not_specific>
block
<not_specific>
<not_specific>
target What the origin will be converted to.
target What the origin will be converted to .