class OpenSCAP::Xccdf::Profile

Attributes

raw[R]

Public Class Methods

new(p) click to toggle source
# File lib/openscap/xccdf/profile.rb, line 10
def initialize(p)
  case p
  when FFI::Pointer
    @raw = p
  else
    raise OpenSCAP::OpenSCAPError, "Cannot initialize #{self.class.name} with #{p}"
  end
end

Public Instance Methods

id() click to toggle source
# File lib/openscap/xccdf/profile.rb, line 19
def id
  OpenSCAP.xccdf_profile_get_id raw
end
title(prefered_lang = nil) click to toggle source
# File lib/openscap/xccdf/profile.rb, line 23
def title(prefered_lang = nil)
  textlist = OpenSCAP::TextList.new(OpenSCAP.xccdf_profile_get_title(@raw))
  title = textlist.plaintext(prefered_lang)
  textlist.destroy
  title
end