Permalink
Browse files

Create local variable for readability

  • Loading branch information...
1 parent 8e02d20 commit e1a4e0340cb8cd4fc0862bd36a956b3236eedf76 John Pignata committed Dec 18, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/temping.rb
View
3 lib/temping.rb
@@ -13,7 +13,8 @@ def create_model(model_name, &block)
raise ModelAlreadyDefined, "Constant #{model_name.to_s.classify} is already defined"
end
- ModelFactory.new(model_name, &block).klass
+ factory = ModelFactory.new(model_name, &block)
+ factory.klass
end
class ModelFactory

0 comments on commit e1a4e03

Please sign in to comment.