Class: Fixturex::TreeBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/fixturex/tree_builder.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cacheObject



57
58
59
# File 'lib/fixturex/tree_builder.rb', line 57

def self.cache
  @cache ||= {}
end

Instance Method Details

#build_dependency_tree(fixture_path, fixture_name) ⇒ Object



61
62
63
64
65
66
# File 'lib/fixturex/tree_builder.rb', line 61

def build_dependency_tree(fixture_path, fixture_name)
  TreeEntry.new(
    FixtureLocation.new(fixture_path, fixture_name),
    nested_fixtures_locations(FixtureModel.new(fixture_path).model_class, fixture_name)
  )
end