Class: OpenSCAP::Xccdf::Profile

Inherits:
Object
  • Object
show all
Includes:
ItemCommon
Defined in:
lib/openscap/xccdf/profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ItemCommon

#description, #id, #references, #title, #version

Constructor Details

#initialize(p) ⇒ Profile

Returns a new instance of Profile.



12
13
14
15
16
17
18
19
# File 'lib/openscap/xccdf/profile.rb', line 12

def initialize p
  case p
  when FFI::Pointer
    @raw = p
  else
    raise OpenSCAP::OpenSCAPError, "Cannot initialize #{self.class.name} with #{p}"
  end
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



10
11
12
# File 'lib/openscap/xccdf/profile.rb', line 10

def raw
  @raw
end

Instance Method Details

#abstract?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/openscap/xccdf/profile.rb', line 26

def abstract?
  OpenSCAP.xccdf_profile_get_abstract @raw
end

#status_currentObject



21
22
23
24
# File 'lib/openscap/xccdf/profile.rb', line 21

def status_current
  pointer = OpenSCAP.xccdf_profile_get_status_current @raw
  Status.new pointer unless pointer.null?
end