def default_value_for(attribute, options = {}, &block)
      value      = options
      allows_nil = true

      if options.is_a?(Hash)
        opts       = options.stringify_keys
        value      = opts.fetch('value', options)
        allows_nil = opts.fetch('allows_nil', true)
      end

      if !method_defined?(:set_default_values)
        include(InstanceMethods)

        after_initialize :set_default_values

        class_attribute :_default_attribute_values
        class_attribute :_default_attribute_values_not_allowing_nil

        extend(DelayedClassMethods)
        init_hash = true
      else
        init_hash = !singleton_methods(false).include?(:_default_attribute_values)
      end

      if init_hash
        self._default_attribute_values = {}
        self._default_attribute_values_not_allowing_nil = []
      end

      if block_given?
        container = BlockValueContainer.new(block)
      else
        container = NormalValueContainer.new(value)
      end
      _default_attribute_values[attribute.to_s] = container
      _default_attribute_values_not_allowing_nil << attribute.to_s unless allows_nil
    end
def default_value_for(attribute, options = {}, &block)
      value      = options
      allows_nil = true

      if options.is_a?(Hash)
        opts       = options.stringify_keys
        value      = opts.fetch('value', options)
        allows_nil = opts.fetch('allows_nil', true)
      end

      if !method_defined?(:set_default_values)
        include(InstanceMethods)

        after_initialize :set_default_values

        class_attribute :_default_attribute_values
        class_attribute :_default_attribute_values_not_allowing_nil

        extend(DelayedClassMethods)
        init_hash = true
      else
        init_hash = !singleton_methods(false).include?(:_default_attribute_values)
      end

      if init_hash
        self._default_attribute_values = {}
        self._default_attribute_values_not_allowing_nil = []
      end

      if block_given?
        container = BlockValueContainer.new(block)
      else
        container = NormalValueContainer.new(value)
      end
      _default_attribute_values[attribute.to_s] = container
      _default_attribute_values_not_allowing_nil << attribute.to_s unless allows_nil
    end
Declares a default value for the given attribute.

 Sets the default value to the given options parameter unless the given options equal { :value => ... }

 The <tt>options</tt> can be used to specify the following things:
 * <tt>value</tt> - Sets the default value.
 * <tt>allows_nil (default: true)</tt> - Sets explicitly passed nil values if option is set to true.