diff options
| author | Paul Buetow <paul@buetow.org> | 2025-02-16 23:15:45 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-02-16 23:15:45 +0200 |
| commit | a246ade229a2a1578358eb25fe5855bc5cf22732 (patch) | |
| tree | 9637a8cf2a9a891d27c0693fb6bc3283a7a22c9b /lib | |
| parent | 556d1d13ad6ce056fb52d920e36c08192c7103c5 (diff) | |
sugar
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dslkeywords/resource.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/dslkeywords/resource.rb b/lib/dslkeywords/resource.rb index 18239fc..4c28809 100644 --- a/lib/dslkeywords/resource.rb +++ b/lib/dslkeywords/resource.rb @@ -33,7 +33,11 @@ module RCM end end - def depends_on?(other) = @depends_on.nil? ? false : @depends_on.key?(other) + def depends_on?(*others) + return false if @depends_on.nil? + + others.flatten.none? { |other| !@depends_on.key?(other) } + end end # A resource is something concrete to be managed, e.g. a file, or a CRON job. |
