Class: OpenSCAP::DS::Sds
- Inherits:
-
Object
- Object
- OpenSCAP::DS::Sds
- Defined in:
- lib/openscap/ds/sds.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(param) ⇒ Sds
constructor
A new instance of Sds.
- #select_checklist(p = {}) ⇒ Object
- #select_checklist!(p = {}) ⇒ Object
Constructor Details
#initialize(param) ⇒ Sds
Returns a new instance of Sds.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/openscap/ds/sds.rb', line 10 def initialize(param) @raw = case param when OpenSCAP::Source OpenSCAP.ds_sds_session_new_from_source param.raw when Hash OpenSCAP.ds_sds_session_new_from_source param[:source].raw end OpenSCAP.raise! if @raw.null? begin yield self ensure destroy end if block_given? end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
8 9 10 |
# File 'lib/openscap/ds/sds.rb', line 8 def raw @raw end |
Instance Method Details
#destroy ⇒ Object
37 38 39 40 |
# File 'lib/openscap/ds/sds.rb', line 37 def destroy OpenSCAP.ds_sds_session_free(@raw) @raw = nil end |