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
- #html_guide(profile = nil) ⇒ 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.
19 20 21 22 23 24 25 26 27 |
# File 'lib/openscap/ds/sds.rb', line 19 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? end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
17 18 19 |
# File 'lib/openscap/ds/sds.rb', line 17 def raw @raw end |
Instance Method Details
#destroy ⇒ Object
46 47 48 49 |
# File 'lib/openscap/ds/sds.rb', line 46 def destroy OpenSCAP.ds_sds_session_free(@raw) @raw = nil end |
#html_guide(profile = nil) ⇒ Object
40 41 42 43 44 |
# File 'lib/openscap/ds/sds.rb', line 40 def html_guide(profile = nil) html = OpenSCAP.ds_sds_session_get_html_guide(@raw, profile) OpenSCAP.raise! if html.nil? html end |