Class: OpenSCAP::Xccdf::Policy
- Inherits:
-
Object
- Object
- OpenSCAP::Xccdf::Policy
- Defined in:
- lib/openscap/xccdf/policy.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(p) ⇒ Policy
constructor
A new instance of Policy.
Constructor Details
#initialize(p) ⇒ Policy
Returns a new instance of Policy.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/openscap/xccdf/policy.rb', line 10 def initialize(p) case p when FFI::Pointer @raw = p else raise OpenSCAP::OpenSCAPError, "Cannot initialize OpenSCAP::Xccdf::Policy with '#{p}'" end OpenSCAP.raise! if @raw.null? end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
8 9 10 |
# File 'lib/openscap/xccdf/policy.rb', line 8 def raw @raw end |
Instance Method Details
#id ⇒ Object
21 22 23 |
# File 'lib/openscap/xccdf/policy.rb', line 21 def id OpenSCAP.xccdf_policy_get_id raw end |