Class: OpenSCAP::Text

Inherits:
Object
  • Object
show all
Defined in:
lib/openscap/text.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeText

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

#rawObject (readonly)

Returns the value of attribute raw.



14
15
16
# File 'lib/openscap/text.rb', line 14

def raw
  @raw
end

Instance Method Details

#destroyObject



28
29
30
31
# File 'lib/openscap/text.rb', line 28

def destroy
  OpenSCAP.oscap_text_free(raw)
  @raw = nil
end

#textObject



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