Sha256: bf59c1a9abd40c92907cbc8dc5ea10074f5adc198eaf56c5f78ac1339b11e628

Contents?: true

Size: 266 Bytes

Versions: 26

Compression:

Stored size: 266 Bytes

Contents

module ForemanOpenscap
  module InheritedPolicies
    def find_inherited_policies(policy_attr)
      return [] unless parent

      ancestors.reduce([]) do |policies, hostgroup|
        policies += hostgroup.public_send(policy_attr)
      end.uniq
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
foreman_openscap-10.1.0 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-10.0.3 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-10.0.2 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-10.0.1 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-10.0.0 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-9.0.4 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-9.0.3 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-9.0.2 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-9.0.1 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-9.0.0 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-8.0.0 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-7.1.1 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-7.1.0 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-7.0.0 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-6.0.0 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-5.2.3 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-5.2.2 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-5.1.1 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-5.2.1 app/models/concerns/foreman_openscap/inherited_policies.rb
foreman_openscap-5.2.0 app/models/concerns/foreman_openscap/inherited_policies.rb