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.
- #items ⇒ Object
- #profiles ⇒ Object
Constructor Details
#initialize(p) ⇒ Benchmark
Returns a new instance of Benchmark.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/openscap/xccdf/benchmark.rb', line 12 def initialize(p) case p when OpenSCAP::Source @raw = OpenSCAP.xccdf_benchmark_import_source p.raw else raise 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.
10 11 12 |
# File 'lib/openscap/xccdf/benchmark.rb', line 10 def raw @raw end |
Instance Method Details
#destroy ⇒ Object
31 32 33 34 |
# File 'lib/openscap/xccdf/benchmark.rb', line 31 def destroy OpenSCAP.xccdf_benchmark_free @raw @raw = nil end |
#items ⇒ Object
27 28 29 |
# File 'lib/openscap/xccdf/benchmark.rb', line 27 def items @items ||= items_init end |
#profiles ⇒ Object
23 24 25 |
# File 'lib/openscap/xccdf/benchmark.rb', line 23 def profiles @profiles ||= profiles_init end |