diff --git a/lib/nexpose/report.rb b/lib/nexpose/report.rb
index f0554d60..7d366f9b 100644
--- a/lib/nexpose/report.rb
+++ b/lib/nexpose/report.rb
@@ -204,18 +204,17 @@ def add_filter(type, id)
end
def to_xml
- xml = %('
xml << ''
@filters.each { |filter| xml << filter.to_xml }
xml << ''
- xml << %() if @baseline
-
+ xml << %() if @baseline
xml << ''
end
@@ -231,7 +230,7 @@ def to_xml
# @return Report in text format except for PDF, which returns binary data.
#
def generate(connection, timeout = 300)
- xml = %()
+ xml = %()
xml << to_xml
xml << ''
response = connection.execute(xml, '1.1', timeout: timeout)
@@ -317,7 +316,7 @@ def self.build(connection, site_id, site_name, type, format, generate_now = fals
# Save the configuration of this report definition.
def save(connection, generate_now = false)
- xml = %()
+ xml = %()
xml << to_xml
xml << ''
response = connection.execute(xml)
@@ -341,10 +340,10 @@ def delete(connection)
include Sanitize
def to_xml
- xml = %('
xml << %(#{@description}) if @description
@@ -353,10 +352,10 @@ def to_xml
xml << ''
xml << ''
- @users.each { |user| xml << %() }
+ @users.each { |user| xml << %() }
xml << ''
- xml << %() if @baseline
+ xml << %() if @baseline
xml << @frequency.to_xml if @frequency
xml << @delivery.to_xml if @delivery
xml << @db_export.to_xml if @db_export
@@ -427,7 +426,14 @@ def initialize(type, id)
end
def to_xml
- %()
+ %()
+ end
+
+ def ==(object)
+ object.equal?(self) ||
+ (object.instance_of?(self.class) &&
+ object.type == @type &&
+ object.id == @id)
end
def self.parse(xml)
@@ -458,7 +464,7 @@ def initialize(after_scan, scheduled, schedule = nil)
end
def to_xml
- xml = %()
+ xml = %()
xml << @schedule.to_xml if @schedule
xml << ''
end
@@ -500,7 +506,7 @@ def initialize(store_on_server, location = nil, email = nil)
def to_xml
xml = ''
- xml << %()
+ xml << %()
xml << %(#{@location}) if @location
xml << ''
xml << @email.to_xml if @email
@@ -543,10 +549,10 @@ def initialize(type)
end
def to_xml
- xml = %()
+ xml = %()
xml << @credentials.to_xml if @credentials
@parameters.each_pair do |name, value|
- xml << %(#{value})
+ xml << %(#{value})
end
xml << ''
end
@@ -585,9 +591,9 @@ def initialize(credential)
def to_xml
xml = ''
xml << @credential if @credential
xml << ''