class OpenSCAP::Xccdf::Reference
Public Class Methods
new(raw)
click to toggle source
# File lib/openscap/xccdf/reference.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
href()
click to toggle source
# File lib/openscap/xccdf/reference.rb, line 17 def href OpenSCAP.oscap_reference_get_href(@raw) end
html_link()
click to toggle source
# File lib/openscap/xccdf/reference.rb, line 21 def html_link "<a href='#{href}'>#{title}</a>" end
title()
click to toggle source
# File lib/openscap/xccdf/reference.rb, line 13 def title OpenSCAP.oscap_reference_get_title(@raw) end
to_hash()
click to toggle source
# File lib/openscap/xccdf/reference.rb, line 25 def to_hash { :title => title, :href => href, :html_link => html_link } end