Class: Archsight::Query::AST::AnnotationCondition

Inherits:
Node
  • Object
show all
Defined in:
lib/archsight/query/ast.rb

Overview

Annotation condition: annotation_path op value

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, operator, value) ⇒ AnnotationCondition

Returns a new instance of AnnotationCondition.



58
59
60
61
62
# File 'lib/archsight/query/ast.rb', line 58

def initialize(path, operator, value)
  @path = path         # String (e.g., "activity/status")
  @operator = operator # String (==, !=, =~, >, <, >=, <=)
  @value = value       # StringValue, NumberValue, or RegexValue
end

Instance Attribute Details

#operatorObject (readonly)

Returns the value of attribute operator.



56
57
58
# File 'lib/archsight/query/ast.rb', line 56

def operator
  @operator
end

#pathObject (readonly)

Returns the value of attribute path.



56
57
58
# File 'lib/archsight/query/ast.rb', line 56

def path
  @path
end

#valueObject (readonly)

Returns the value of attribute value.



56
57
58
# File 'lib/archsight/query/ast.rb', line 56

def value
  @value
end

Instance Method Details

#accept(visitor) ⇒ Object



64
65
66
# File 'lib/archsight/query/ast.rb', line 64

def accept(visitor)
  visitor.visit_annotation_condition(self)
end