lib/lean-attributes/attributes/class_methods.rb
# If missing, injects a generated coercion method named after the type,
# which is used by attributes of said type
#
# @param [Symbol] type
#
# @since 0.4.0
# @api private
#
# @see Lean::TypeCoercionMethod
If missing, injects a generated coercion method named after the type,
which is used by attributes of said type
If missing injects a generated coercion method named after the type which is used by attributes of said type
def add_type_coercion_method(type)
        return if defined_attribute_types.include?(type)
        type_coercion_method = TypeCoercionMethod.new(type)
        class_eval(type_coercion_method.definition, __FILE__, __LINE__ + 1)
        defined_attribute_types << type
      end
def add_type_coercion_method ( type ) return if defined_attribute_types . include? ( type ) type_coercion_method = TypeCoercionMethod . new ( type ) class_eval ( type_coercion_method . definition , __FILE__ , __LINE__ + 1 ) defined_attribute_types << type end
If missing, injects a generated coercion method named after the type,
which is used by attributes of said type
If missing injects a generated coercion method named after the type which is used by attributes of said type
type
None
since
None
api
None
see
None