Class: OpenSCAP::Xccdf::Benchmark
- Inherits:
-
Object
- Object
- OpenSCAP::Xccdf::Benchmark
- Defined in:
- lib/openscap/xccdf/benchmark.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(p) ⇒ Benchmark
constructor
A new instance of Benchmark.
- #profiles ⇒ Object
Constructor Details
#initialize(p) ⇒ Benchmark
Returns a new instance of Benchmark.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/openscap/xccdf/benchmark.rb', line 20 def initialize(p) case p when OpenSCAP::Source @raw = OpenSCAP.xccdf_benchmark_import_source p.raw else fail OpenSCAP::OpenSCAPError, "Cannot initialize OpenSCAP::Xccdf::Benchmark with '#{p}'" 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/benchmark.rb', line 18 def raw @raw end |
Instance Method Details
#destroy ⇒ Object
35 36 37 38 |
# File 'lib/openscap/xccdf/benchmark.rb', line 35 def destroy OpenSCAP.xccdf_benchmark_free @raw @raw = nil end |
#profiles ⇒ Object
31 32 33 |
# File 'lib/openscap/xccdf/benchmark.rb', line 31 def profiles @profiles ||= profiles_init end |