Class: AppMap::Feature::Package

Inherits:
Base show all
Defined in:
lib/appmap/feature.rb

Overview

Package is a feature which represents the directory containing code.

Instance Attribute Summary

Attributes inherited from Base

#children, #parent

Attributes inherited from FeatureStruct

#attributes, #location, #name

Instance Method Summary collapse

Methods inherited from Base

#add_child, #collect_functions, #enclosing_type_name, #enclosing_type_name?, expand_path, #include_option, #initialize, #prune, #remove_child, #reparent, #to_h, #to_json, #type?, #valid?

Constructor Details

This class inherits a constructor from AppMap::Feature::Base

Instance Method Details

#prune?Boolean

prune a package if it’s empty, or if it contains anything but packages.

Returns:

  • (Boolean)


199
200
201
# File 'lib/appmap/feature.rb', line 199

def prune?
  children.empty? || children.any? { |c| !c.is_a?(Package) }
end