Class: OpenSCAP::Xccdf::Tailoring
- Inherits:
-
Object
- Object
- OpenSCAP::Xccdf::Tailoring
- Defined in:
- lib/openscap/xccdf/tailoring.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(source, benchmark) ⇒ Tailoring
constructor
A new instance of Tailoring.
- #profiles ⇒ Object
Constructor Details
#initialize(source, benchmark) ⇒ Tailoring
Returns a new instance of Tailoring.
20 21 22 23 24 25 26 27 28 |
# File 'lib/openscap/xccdf/tailoring.rb', line 20 def initialize(source, benchmark) case source when OpenSCAP::Source @raw = OpenSCAP.xccdf_tailoring_import_source source.raw, benchmark else raise OpenSCAP::OpenSCAPError, "Cannot initialize #{self.class.name} with '#{source}'" end OpenSCAP.raise! if @raw.null? end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
18 19 20 |
# File 'lib/openscap/xccdf/tailoring.rb', line 18 def raw @raw end |
Instance Method Details
#destroy ⇒ Object
34 35 36 37 |
# File 'lib/openscap/xccdf/tailoring.rb', line 34 def destroy OpenSCAP.xccdf_tailoring_free @raw @raw = nil end |
#profiles ⇒ Object
30 31 32 |
# File 'lib/openscap/xccdf/tailoring.rb', line 30 def profiles @profiles ||= profiles_init end |