Class: Nexpose::Tag::Criterion

Inherits:
Criterion show all
Defined in:
lib/nexpose/tag/criteria.rb

Instance Attribute Summary

Attributes inherited from Criterion

#field, #operator, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Criterion

#initialize

Constructor Details

This class inherits a constructor from Nexpose::Criterion

Class Method Details

.parse(json) ⇒ Object



13
14
15
16
17
# File 'lib/nexpose/tag/criteria.rb', line 13

def self.parse(json)
  Criterion.new(json['field_name'],
                json['operator'],
                json['values'])
end

Instance Method Details

#to_mapObject



6
7
8
9
10
11
# File 'lib/nexpose/tag/criteria.rb', line 6

def to_map
  { 'operator' => operator,
    'values' => Array(value),
    'field_name' => field
  }
end