Method: Ccls::FactoryTestHelper#method_missing_with_pluralization

Defined in:
lib/ccls_engine/factory_test_helper.rb

#method_missing_with_pluralization(symb, *args, &block) ⇒ Object



208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/ccls_engine/factory_test_helper.rb', line 208

def method_missing_with_pluralization(symb,*args, &block)
	method_name = symb.to_s
	if method_name =~ /^create_(.*)_with_(.*)$/
		model     = $1.singularize
		attribute = $2.singularize
		args.collect do |arg|
			send("create_#{model}_with_#{attribute}",arg)
		end
	else
		method_missing_without_pluralization(symb, *args, &block)
	end
end