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.
Class Method Summary collapse
- .build_from_gem(gem, package_name: nil, exclude: [], labels: []) ⇒ Object
- .build_from_path(path, package_name: nil, exclude: [], labels: []) ⇒ Object
Instance Method Summary collapse
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 |
Class Method Details
.build_from_gem(gem, package_name: nil, exclude: [], labels: []) ⇒ Object
11 12 13 14 15 |
# File 'lib/appmap/config.rb', line 11 def build_from_gem(gem, package_name: nil, exclude: [], labels: []) gem_paths(gem).map do |gem_path| Package.new(gem_path, gem, package_name, exclude, labels) end end |
.build_from_path(path, package_name: nil, exclude: [], labels: []) ⇒ Object
7 8 9 |
# File 'lib/appmap/config.rb', line 7 def build_from_path(path, package_name: nil, exclude: [], labels: []) Package.new(path, nil, package_name, exclude, labels) end |
Instance Method Details
#name ⇒ Object
29 30 31 |
# File 'lib/appmap/config.rb', line 29 def name gem || path end |
#to_h ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/appmap/config.rb', line 33 def to_h { path: path, package_name: package_name, gem: gem, exclude: exclude.blank? ? nil : exclude, labels: labels.blank? ? nil : labels }.compact end |