class Nexpose::DiscoveryConnection::Criteria
Override of filter criteria to account for different parsing from JSON.
Public Class Methods
parseHash(hash)
click to toggle source
Create a Criteria
object from a Hash.
@param [Hash] Hash of a Criteria
object. @return [Criteria] Parsed object.
# File lib/nexpose/discovery.rb, line 272 def self.parseHash(hash) # The call returns empty JSON, so default to 'AND' if not present. operator = hash[:operator] || 'AND' ret = Criteria.new([], operator) hash[:criteria].each do |c| ret.criteria << Criterion.parseHash(c) end ret end