# File lib/factory_girl/definition_proxy.rb, line 34
    def add_attribute(name, value = nil, &block)
      if block_given?
        if value
          raise AttributeDefinitionError, "Both value and block given"
        else
          attribute = Attribute::Dynamic.new(name, block)
        end
      else
        attribute = Attribute::Static.new(name, value)
      end

      @factory.define_attribute(attribute)
    end