Module: CobraCommander::Executor::PackageCriteria
- Included in:
- Command
- Defined in:
- lib/cobra_commander/executor/package_criteria.rb
Instance Method Summary collapse
Instance Method Details
#_match_depends_on?(package, packages) ⇒ Boolean
13 14 15 |
# File 'lib/cobra_commander/executor/package_criteria.rb', line 13 def _match_depends_on?(package, packages) (Array(packages) - package.dependencies).empty? end |
#match_criteria?(package, criteria) ⇒ Boolean
6 7 8 9 10 11 |
# File 'lib/cobra_commander/executor/package_criteria.rb', line 6 def match_criteria?(package, criteria) criteria.all? do |criteria_key, criteria_value| criteria_method = "_match_#{criteria_key}?" !respond_to?(criteria_method, true) || send(criteria_method, package, criteria_value) end end |