Method: Risu::Parsers::Nexpose::SimpleNexpose#on_end_element

Defined in:
lib/risu/parsers/nexpose/simple_nexpose.rb

#on_end_element(element) ⇒ Object

Called when the end of the XML element is reached

Parameters:

  • element


82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/risu/parsers/nexpose/simple_nexpose.rb', line 82

def on_end_element(element)
	@tag = nil
	case element
		when "device"
			@in_device = false
		when "description"
			if @in_device && @in_fingerprint
				@rh.attributes = { VALID_FINGERPRINTS[element] => @vals[element].gsub("\n", ",") } if VALID_FINGERPRINTS.key?(element)
				@rh.save
			end
		when "fingerprint"
			@in_fingerprint = false
	end
end