Sha256: ec20d59417626895062a4300070c012dbeead2bd28c4edbeb4a4f897e1ed5d9d
Contents?: true
Size: 568 Bytes
Versions: 2
Compression:
Stored size: 568 Bytes
Contents
# frozen_string_literal: true require_relative "./job" require_relative "./package_criteria" module CobraCommander module Executor module PackageCriteria 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 def _match_depends_on?(package, packages) (Array(packages) - package.dependencies).empty? end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cobra_commander-1.0.1 | lib/cobra_commander/executor/package_criteria.rb |
cobra_commander-1.0.0 | lib/cobra_commander/executor/package_criteria.rb |