Class: AppMap::Config::Package
- Inherits:
-
Struct
- Object
- Struct
- AppMap::Config::Package
- Defined in:
- lib/appmap/config.rb
Instance Attribute Summary collapse
-
#exclude ⇒ Object
Returns the value of attribute exclude.
-
#gem ⇒ Object
Returns the value of attribute gem.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#package_name ⇒ Object
Returns the value of attribute package_name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#shallow ⇒ Object
Returns the value of attribute shallow.
Class Method Summary collapse
- .build_from_gem(gem, shallow: true, package_name: nil, exclude: [], labels: []) ⇒ Object
- .build_from_path(path, shallow: false, package_name: nil, exclude: [], labels: []) ⇒ Object
Instance Method Summary collapse
- #name ⇒ Object
-
#shallow? ⇒ Boolean
Indicates that only the entry points to a package will be recorded.
- #to_h ⇒ Object
Instance Attribute Details
#exclude ⇒ Object
Returns the value of attribute exclude
5 6 7 |
# File 'lib/appmap/config.rb', line 5 def exclude @exclude end |
#gem ⇒ Object
Returns the value of attribute gem
5 6 7 |
# File 'lib/appmap/config.rb', line 5 def gem @gem end |
#labels ⇒ Object
Returns the value of attribute labels
5 6 7 |
# File 'lib/appmap/config.rb', line 5 def labels @labels end |
#package_name ⇒ Object
Returns the value of attribute package_name
5 6 7 |
# File 'lib/appmap/config.rb', line 5 def package_name @package_name end |
#path ⇒ Object
Returns the value of attribute path
5 6 7 |
# File 'lib/appmap/config.rb', line 5 def path @path end |
#shallow ⇒ Object
Returns the value of attribute shallow
5 6 7 |
# File 'lib/appmap/config.rb', line 5 def shallow @shallow end |
Class Method Details
.build_from_gem(gem, shallow: true, package_name: nil, exclude: [], labels: []) ⇒ Object
18 19 20 21 22 |
# File 'lib/appmap/config.rb', line 18 def build_from_gem(gem, shallow: true, package_name: nil, exclude: [], labels: []) gem_paths(gem).map do |gem_path| Package.new(gem_path, gem, package_name, exclude, labels, shallow) end end |
Instance Method Details
#name ⇒ Object
36 37 38 |
# File 'lib/appmap/config.rb', line 36 def name gem || path end |
#shallow? ⇒ Boolean
Indicates that only the entry points to a package will be recorded. Once the code has entered a package, subsequent calls within the package will not be recorded unless the code leaves the package and re-enters it.
9 10 11 |
# File 'lib/appmap/config.rb', line 9 def shallow? shallow end |
#to_h ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/appmap/config.rb', line 40 def to_h { path: path, package_name: package_name, gem: gem, exclude: exclude.blank? ? nil : exclude, labels: labels.blank? ? nil : labels, shallow: shallow }.compact end |