Module: ForemanOpenscap::OvalFacetHostExtensions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb
Instance Method Summary collapse
- #combined_oval_policies ⇒ Object
- #cves_with_errata ⇒ Object
- #cves_without_errata ⇒ Object
- #oval_policies_enc ⇒ Object
- #oval_policies_enc_raw ⇒ Object
Instance Method Details
#combined_oval_policies ⇒ Object
24 25 26 27 28 |
# File 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb', line 24 def combined_oval_policies combined = oval_policies combined += hostgroup.oval_policies + hostgroup.inherited_oval_policies if hostgroup combined.uniq end |
#cves_with_errata ⇒ Object
20 21 22 |
# File 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb', line 20 def cves_with_errata cves.where(:has_errata => true) end |
#cves_without_errata ⇒ Object
16 17 18 |
# File 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb', line 16 def cves_without_errata cves.where(:has_errata => false) end |
#oval_policies_enc ⇒ Object
34 35 36 |
# File 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb', line 34 def oval_policies_enc oval_policies_enc_raw.to_json end |
#oval_policies_enc_raw ⇒ Object
30 31 32 |
# File 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb', line 30 def oval_policies_enc_raw combined_oval_policies.map(&:to_enc) end |