Class: OpenSCAP::Xccdf::Fix

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

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ Fix

Returns a new instance of Fix.



6
7
8
9
10
# File 'lib/openscap/xccdf/fix.rb', line 6

def initialize raw
  raise OpenSCAP::OpenSCAPError, "Cannot initialize #{self.class.name} with '#{raw}'" unless raw.is_a? FFI::Pointer

  @raw = raw
end

Instance Method Details

#contentObject



24
25
26
# File 'lib/openscap/xccdf/fix.rb', line 24

def content
  OpenSCAP.xccdf_fix_get_content @raw
end

#fix_systemObject



20
21
22
# File 'lib/openscap/xccdf/fix.rb', line 20

def fix_system
  OpenSCAP.xccdf_fix_get_system @raw
end

#idObject



12
13
14
# File 'lib/openscap/xccdf/fix.rb', line 12

def id
  OpenSCAP.xccdf_fix_get_id @raw
end

#platformObject



16
17
18
# File 'lib/openscap/xccdf/fix.rb', line 16

def platform
  OpenSCAP.xccdf_fix_get_platform @raw
end

#to_hashObject



28
29
30
# File 'lib/openscap/xccdf/fix.rb', line 28

def to_hash
  { id:, platform:, system: fix_system, content: }
end