Class: Archsight::Query::AST::IncomingTransitiveRelation

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

Overview

Incoming transitive 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, max_depth = 10) ⇒ IncomingTransitiveRelation

Returns a new instance of IncomingTransitiveRelation.



204
205
206
207
208
209
# File 'lib/archsight/query/ast.rb', line 204

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

Instance Attribute Details

#exclude_verbsObject (readonly)

Returns the value of attribute exclude_verbs.



202
203
204
# File 'lib/archsight/query/ast.rb', line 202

def exclude_verbs
  @exclude_verbs
end

#max_depthObject (readonly)

Returns the value of attribute max_depth.



202
203
204
# File 'lib/archsight/query/ast.rb', line 202

def max_depth
  @max_depth
end

#targetObject (readonly)

Returns the value of attribute target.



202
203
204
# File 'lib/archsight/query/ast.rb', line 202

def target
  @target
end

#verbsObject (readonly)

Returns the value of attribute verbs.



202
203
204
# File 'lib/archsight/query/ast.rb', line 202

def verbs
  @verbs
end

Instance Method Details

#accept(visitor) ⇒ Object



211
212
213
# File 'lib/archsight/query/ast.rb', line 211

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