Class: FactoryTrace::Preprocessors::ExtractUsed
- Inherits:
-
Object
- Object
- FactoryTrace::Preprocessors::ExtractUsed
- Defined in:
- lib/factory_trace/preprocessors/extract_used.rb
Class Method Summary collapse
-
.call(trace) ⇒ FactoryTrace::Structures::Collection
Returns a collection with used factories and traits gathered from trace.
Class Method Details
.call(trace) ⇒ FactoryTrace::Structures::Collection
Returns a collection with used factories and traits gathered from trace
9 10 11 12 13 14 15 16 17 |
# File 'lib/factory_trace/preprocessors/extract_used.rb', line 9 def self.call(trace) collection = FactoryTrace::Structures::Collection.new trace.each do |factory_name, trait_names| collection.add(FactoryTrace::Structures::Factory.new(factory_name, nil, trait_names.to_a)) end collection end |