class OpenscapParser::Fix

Public Instance Methods

complexity() click to toggle source
# File lib/openscap_parser/fix.rb, line 16
def complexity
  @complexity ||= @parsed_xml['complexity']
end
disruption() click to toggle source
# File lib/openscap_parser/fix.rb, line 20
def disruption
  @disruption ||= @parsed_xml['disruption']
end
full_text(set_values) click to toggle source
# File lib/openscap_parser/fix.rb, line 28
def full_text(set_values)
  full_text_lines(set_values).join('')
end
full_text_lines(set_values) click to toggle source
# File lib/openscap_parser/fix.rb, line 32
def full_text_lines(set_values)
  map_child_nodes(set_values).map do |text_node|
    text_node.respond_to?(:text) ? text_node.text : ''
  end
end
id() click to toggle source
# File lib/openscap_parser/fix.rb, line 8
def id
  @id ||= @parsed_xml['id']
end
map_child_nodes(set_values = []) click to toggle source
# File lib/openscap_parser/fix.rb, line 38
def map_child_nodes(set_values = [])
  map_sub_nodes @parsed_xml.children, set_values
end
strategy() click to toggle source
# File lib/openscap_parser/fix.rb, line 24
def strategy
  @strategy ||= @parsed_xml['strategy']
end
system() click to toggle source
# File lib/openscap_parser/fix.rb, line 12
def system
  @system ||= @parsed_xml['system']
end
to_h() click to toggle source
# File lib/openscap_parser/fix.rb, line 42
def to_h
  {
    :id => id,
    :system => system,
    :complexity => complexity,
    :disruption => disruption,
    :strategy => strategy,
    :text => text,
    :subs => subs.map(&:to_h)
  }
end