Module: MetzScan::Analyzers::InheritanceDescendants::Metadata
- Defined in:
- lib/metz_scan/analyzers/inheritance_descendants/metadata.rb
Class Method Summary collapse
- .for(base_name, descendants, descendant_locations, context) ⇒ Object
- .location_metadata(locations) ⇒ Object
Class Method Details
.for(base_name, descendants, descendant_locations, context) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/metz_scan/analyzers/inheritance_descendants/metadata.rb', line 9 def for(base_name, descendants, descendant_locations, context) { "base_name" => base_name, "descendants" => descendants, "descendant_count" => descendants.size, "descendant_locations" => (descendant_locations), "project_analyzer_category" => context.fetch(:root_kind), "root_kind" => context.fetch(:root_kind), "source" => context.fetch(:source) }.compact end |
.location_metadata(locations) ⇒ Object
17 18 19 |
# File 'lib/metz_scan/analyzers/inheritance_descendants/metadata.rb', line 17 def (locations) locations.map { |location| { "name" => location.name, "path" => location.path } } end |