Class: Ibex::Impact::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/ibex/impact/propagation.rb

Overview

One shortest witness for a symbol reached by dependency propagation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(symbol:, distance:, witness:, kind:, component:) ⇒ Node

Returns a new instance of Node.



17
18
19
20
21
22
23
24
# File 'lib/ibex/impact/propagation.rb', line 17

def initialize(symbol:, distance:, witness:, kind:, component:)
  @symbol = symbol
  @distance = distance
  @witness = witness.freeze
  @kind = kind
  @component = component.freeze
  freeze
end

Instance Attribute Details

#componentObject (readonly)

: Array



14
15
16
# File 'lib/ibex/impact/propagation.rb', line 14

def component
  @component
end

#distanceObject (readonly)

: Integer



11
12
13
# File 'lib/ibex/impact/propagation.rb', line 11

def distance
  @distance
end

#kindObject (readonly)

: Symbol



13
14
15
# File 'lib/ibex/impact/propagation.rb', line 13

def kind
  @kind
end

#symbolObject (readonly)

: Integer



10
11
12
# File 'lib/ibex/impact/propagation.rb', line 10

def symbol
  @symbol
end

#witnessObject (readonly)

: Array



12
13
14
# File 'lib/ibex/impact/propagation.rb', line 12

def witness
  @witness
end