class OpenSCAP::Xccdf::Fix

Public Class Methods

new(raw) click to toggle source
# 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

Public Instance Methods

content() click to toggle source
# File lib/openscap/xccdf/fix.rb, line 26
def content
  OpenSCAP.xccdf_fix_get_content(@raw)
end
fix_system() click to toggle source

system is a reserved word in Rails, so didn't use it

# File lib/openscap/xccdf/fix.rb, line 22
def fix_system
  OpenSCAP.xccdf_fix_get_system(@raw)
end
id() click to toggle source
# File lib/openscap/xccdf/fix.rb, line 13
def id
  OpenSCAP.xccdf_fix_get_id(@raw)
end
platform() click to toggle source
# File lib/openscap/xccdf/fix.rb, line 17
def platform
  OpenSCAP.xccdf_fix_get_platform(@raw)
end
to_hash() click to toggle source
# File lib/openscap/xccdf/fix.rb, line 30
def to_hash
  {
    :id => id,
    :platform => platform,
    :system => fix_system,
    :content => content
  }
end