Module: Fixtory::Methods
- Defined in:
- lib/fixtory/methods.rb
Instance Method Summary collapse
Instance Method Details
#fixtory(group_name) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fixtory/methods.rb', line 4 def fixtory(group_name) group_name = group_name.to_s if Fixtory.identity_map.key?(group_name) builder = Fixtory.identity_map[group_name] unless builder._inserted builder._insert end builder else builder = Fixtory::DSL.build_from(Fixtory.path_for(group_name)) Fixtory.identity_map[group_name] = builder builder._insert builder end end |