Method: Rubory::CreationDsl#method_missing

Defined in:
lib/factories.rb

#method_missing(method, *args, &creation_block) ⇒ Object



74
75
76
77
78
79
80
# File 'lib/factories.rb', line 74

def method_missing(method, *args, &creation_block)
  if block_given?
    @factory.value_for(method, &creation_block)
  else
    @factory.value_for(method) { args.first }
  end
end