Class: LicenseFinder::LicenseAggregator
- Inherits:
-
Object
- Object
- LicenseFinder::LicenseAggregator
- Defined in:
- lib/license_finder/license_aggregator.rb
Instance Method Summary collapse
- #any_packages? ⇒ Boolean
- #dependencies ⇒ Object
-
#initialize(config, aggregate_paths) ⇒ LicenseAggregator
constructor
A new instance of LicenseAggregator.
- #restricted ⇒ Object
- #unapproved ⇒ Object
Constructor Details
#initialize(config, aggregate_paths) ⇒ LicenseAggregator
Returns a new instance of LicenseAggregator.
5 6 7 8 |
# File 'lib/license_finder/license_aggregator.rb', line 5 def initialize(config, aggregate_paths) @config = config @aggregate_paths = aggregate_paths end |
Instance Method Details
#any_packages? ⇒ Boolean
14 15 16 17 18 19 |
# File 'lib/license_finder/license_aggregator.rb', line 14 def any_packages? finders.map do |finder| finder.prepare_projects if @config.prepare finder.any_packages? end.reduce(:|) end |
#dependencies ⇒ Object
10 11 12 |
# File 'lib/license_finder/license_aggregator.rb', line 10 def dependencies aggregate_packages end |
#restricted ⇒ Object
25 26 27 |
# File 'lib/license_finder/license_aggregator.rb', line 25 def restricted aggregate_packages.select(&:restricted?) end |
#unapproved ⇒ Object
21 22 23 |
# File 'lib/license_finder/license_aggregator.rb', line 21 def unapproved aggregate_packages.reject(&:approved?) end |