lib/nexpose/scan.rb
# Utility method for appending a HostName or IPRange object into an
# XML object, in preparation for ad hoc scanning.
#
# @param [REXML::Document] xml Prepared API call to execute.
# @param [HostName|IPRange] asset Asset to append to XML.
#
Utility method for appending a HostName or IPRange object into an
XML object, in preparation for ad hoc scanning.
Utility method for appending a HostName or IPRange object into an XML object in preparation for ad hoc scanning .
def _append_asset!(xml, asset)
      if asset.kind_of? Nexpose::IPRange
        xml.add_element('range', { 'from' => asset.from, 'to' => asset.to })
      else  
        host = REXML::Element.new('host')
        host.text = asset.host
        xml.add_element(host)
      end
    end
def _append_asset! ( xml , asset ) if asset . kind_of? Nexpose :: IPRange xml . add_element ( 'range' , { 'from' => asset . from , 'to' => asset . to } ) else host = REXML :: Element . new ( 'host' ) host . text = asset . host xml . add_element ( host ) end end
Utility method for appending a HostName or IPRange object into an
XML object, in preparation for ad hoc scanning.
Utility method for appending a HostName or IPRange object into an XML object in preparation for ad hoc scanning .
# Assume HostName
xml
<not_specific>
asset
<not_specific>
<not_specific>
asset Asset to append to XML.
asset Asset to append to XML .