Class: OpenSCAP::Source
- Inherits:
-
Object
- Object
- OpenSCAP::Source
- Defined in:
- lib/openscap/source.rb
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(input_filename) ⇒ Source
constructor
A new instance of Source.
- #raw ⇒ Object
Constructor Details
#initialize(input_filename) ⇒ Source
Returns a new instance of Source.
14 15 16 17 18 19 20 |
# File 'lib/openscap/source.rb', line 14 def initialize(input_filename) raise OpenSCAPError, "No filename specified!" unless input_filename @s = OpenSCAP.oscap_source_new_from_file(input_filename) if @s.null? OpenSCAP.raise! end end |
Instance Method Details
#destroy ⇒ Object
26 27 28 29 |
# File 'lib/openscap/source.rb', line 26 def destroy OpenSCAP.oscap_source_free(@s) @s = nil end |
#raw ⇒ Object
22 23 24 |
# File 'lib/openscap/source.rb', line 22 def raw @s end |