From a3e20d5ff7f83f03f4ed2b63687370236e322818 Mon Sep 17 00:00:00 2001 From: Joshua Clayton Date: Fri, 12 Aug 2011 14:49:21 -0400 Subject: [PATCH] Cleanup --- lib/factory_girl/attribute/attribute_group.rb | 5 +++-- lib/factory_girl/definition_proxy.rb | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/factory_girl/attribute/attribute_group.rb b/lib/factory_girl/attribute/attribute_group.rb index 3de0f7c..affaf8f 100644 --- a/lib/factory_girl/attribute/attribute_group.rb +++ b/lib/factory_girl/attribute/attribute_group.rb @@ -1,7 +1,7 @@ module FactoryGirl - class Attribute + class Attribute #:nodoc: - class AttributeGroup < Attribute + class AttributeGroup < Attribute #:nodoc: def initialize(name, factory) super(name) @factory = factory @@ -17,5 +17,6 @@ module FactoryGirl (@factory || FactoryGirl).attribute_group_by_name(name) end end + end end diff --git a/lib/factory_girl/definition_proxy.rb b/lib/factory_girl/definition_proxy.rb index ee22ed7..48d2780 100644 --- a/lib/factory_girl/definition_proxy.rb +++ b/lib/factory_girl/definition_proxy.rb @@ -7,6 +7,7 @@ module FactoryGirl end attr_reader :child_factories + def initialize(factory) @factory = factory @child_factories = [] @@ -153,7 +154,7 @@ module FactoryGirl def factory(name, options = {}, &block) @child_factories << [name, options, block] end - + def attribute_group(name, &block) @factory.define_attribute_group(AttributeGroup.new(name, &block)) end