Class: MiniKraken::Core::Fusion
- Inherits:
-
Object
- Object
- MiniKraken::Core::Fusion
- 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
-
#elements ⇒ Array<String>
readonly
I_names of variables being substituted.
-
#i_name ⇒ String
readonly
I_name of substituting variable.
Instance Method Summary collapse
-
#dependencies(_ctx) ⇒ Set
The empty set.
-
#initialize(aName, fused) ⇒ Fusion
constructor
Records the fusion of two or more logical variables.
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
#elements ⇒ Array<String> (readonly)
12 13 14 |
# File 'lib/mini_kraken/core/fusion.rb', line 12 def elements @elements end |
#i_name ⇒ String (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 |