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