Class: Archsight::Query::AST::OutgoingDirectRelation

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

Overview

Outgoing direct relation: -> Kind or -> “InstanceName” With optional verb filter: -verb> or -!verb>

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, verbs = nil, exclude_verbs = false) ⇒ OutgoingDirectRelation

Returns a new instance of OutgoingDirectRelation.



155
156
157
158
159
# File 'lib/archsight/query/ast.rb', line 155

def initialize(target, verbs = nil, exclude_verbs = false)
  @target = target               # KindTarget or InstanceTarget
  @verbs = verbs                 # Array of verb strings, or nil for "all verbs"
  @exclude_verbs = exclude_verbs # true = denylist, false = allowlist
end

Instance Attribute Details

#exclude_verbsObject (readonly)

Returns the value of attribute exclude_verbs.



153
154
155
# File 'lib/archsight/query/ast.rb', line 153

def exclude_verbs
  @exclude_verbs
end

#targetObject (readonly)

Returns the value of attribute target.



153
154
155
# File 'lib/archsight/query/ast.rb', line 153

def target
  @target
end

#verbsObject (readonly)

Returns the value of attribute verbs.



153
154
155
# File 'lib/archsight/query/ast.rb', line 153

def verbs
  @verbs
end

Instance Method Details

#accept(visitor) ⇒ Object



161
162
163
# File 'lib/archsight/query/ast.rb', line 161

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