Class: OpenSCAP::Text
- Inherits:
-
Object
- Object
- OpenSCAP::Text
- Defined in:
- lib/openscap/text.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize ⇒ Text
constructor
A new instance of Text.
- #text ⇒ Object
- #text=(str) ⇒ Object
Constructor Details
#initialize ⇒ Text
Returns a new instance of Text.
16 17 18 |
# File 'lib/openscap/text.rb', line 16 def initialize @raw = OpenSCAP.oscap_text_new end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
14 15 16 |
# File 'lib/openscap/text.rb', line 14 def raw @raw end |
Instance Method Details
#destroy ⇒ Object
28 29 30 31 |
# File 'lib/openscap/text.rb', line 28 def destroy OpenSCAP.oscap_text_free(raw) raw = nil end |
#text ⇒ Object
24 25 26 |
# File 'lib/openscap/text.rb', line 24 def text OpenSCAP.oscap_text_get_text(raw) end |
#text=(str) ⇒ Object
20 21 22 |
# File 'lib/openscap/text.rb', line 20 def text=(str) OpenSCAP.raise! unless OpenSCAP.oscap_text_set_text(raw, str) end |