Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Create local variable for readability

  • Loading branch information...
commit e1a4e0340cb8cd4fc0862bd36a956b3236eedf76 1 parent 8e02d20
John Pignata authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/temping.rb
3  lib/temping.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.