title: Multiple arguments with block in FactoryGirl
body: <p>I have a method in <code>spec\factories\campaigns.rb</code>:</p>
  
  <pre><code>def campaign_trait(name, *callback_attrs, &amp;block)
    trait name do
      association :campaign_type, factory: [:campaign_type, name]
  
      after(:build) do |campaign, evaluator|
        eval_str = ""
        callback_attrs.each do |arg|
          arg = [arg] unless arg.is_a? Array
  
          method_name = arg.shift
          method_args = arg
          method_name = "add_#{method_name}" unless respond_to? method_name
  
          eval_str &lt;&lt; method_name.to_s
          eval_str &lt;&lt; "(campaign"
          eval_str &lt;&lt; ", evaluator" if method_name == "add_campaign_scopes"
          if method_args.any?
            method_args.map! { |i| i.is_a?(Symbol) ? ":#{i}" : i }
            eval_str &lt;&lt; ", " &lt;&lt; method_args.map(&amp;:to_s).join(', ')
          end
          eval_str &lt;&lt; ")\n"
        end
        eval eval_str
      end
  
      yield(block) if block_given?
    end
  end
  </code></pre>
  
  <p>I call it here:</p>
  
  <pre><code>FactoryGirl.define do
      campaign_trait :basket, :campaign_scopes, [:banner, :basket] do
        initialize_with { Campaigns::Basket.new(attributes, without_protection: true) }
        emitent_article 'emitent'
        emitent_name 'Emitent'
      end
  end
  </code></pre>
  
  <p>The problem that I face is that in the method <code>campaign_trait</code> I get  <code>callback_attrs</code> that equals <code>[:campaign_scopes, []]</code> instead of expected <code>[:campaign_scopes, [:banner, :basket]]</code>. </p>
  
  <p>If I call <code>campaign_trait</code> without the block, everything is OK and I get <code>[:campaign_scopes, [:banner, :basket]]</code> as expected.</p>
  
  <p>Could you please help me?</p>