Class: MiniKraken::Core::Fusion

Inherits:
Object
  • Object
show all
Defined in:
lib/mini_kraken/core/fusion.rb

Overview

A record of the fusion / merge of two or more logical variables.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aName, fused) ⇒ Fusion

Records the fusion of two or more logical variables. The fused variables are substituted by a new variable



18
19
20
21
# File 'lib/mini_kraken/core/fusion.rb', line 18

def initialize(aName, fused)
  @i_name = aName
  @elements = fused
end

Instance Attribute Details

#elementsArray<String> (readonly)



12
13
14
# File 'lib/mini_kraken/core/fusion.rb', line 12

def elements
  @elements
end

#i_nameString (readonly)



9
10
11
# File 'lib/mini_kraken/core/fusion.rb', line 9

def i_name
  @i_name
end

Instance Method Details

#dependencies(_ctx) ⇒ Set



24
25
26
# File 'lib/mini_kraken/core/fusion.rb', line 24

def dependencies(_ctx)
  @dependencies ||= Set.new(elements)
end