Class: Flowckerc::SolverClass::AtomExecContext
- Inherits:
-
Object
- Object
- Flowckerc::SolverClass::AtomExecContext
- Defined in:
- lib/flowckerc.rb
Instance Method Summary collapse
- #config(data = {}) ⇒ Object
-
#initialize(atom, parent) ⇒ AtomExecContext
constructor
A new instance of AtomExecContext.
- #inp(spec) ⇒ Object
- #name(atom_name) ⇒ Object
- #options ⇒ Object
- #out(spec) ⇒ Object
Constructor Details
#initialize(atom, parent) ⇒ AtomExecContext
Returns a new instance of AtomExecContext.
131 132 133 134 |
# File 'lib/flowckerc.rb', line 131 def initialize atom, parent @atom = atom @parent = parent end |
Instance Method Details
#config(data = {}) ⇒ Object
152 153 154 |
# File 'lib/flowckerc.rb', line 152 def config data={} @atom.config = data end |
#inp(spec) ⇒ Object
142 143 144 145 146 |
# File 'lib/flowckerc.rb', line 142 def inp spec to_port = spec[:to] spec[:to] = [@atom.id, to_port] @parent.link spec end |
#name(atom_name) ⇒ Object
148 149 150 |
# File 'lib/flowckerc.rb', line 148 def name atom_name @parent.syms.add atom_name, @atom end |
#options ⇒ Object
156 157 158 |
# File 'lib/flowckerc.rb', line 156 def @parent. end |
#out(spec) ⇒ Object
136 137 138 139 140 |
# File 'lib/flowckerc.rb', line 136 def out spec from_port = spec[:from] spec[:from] = [@atom.id, from_port] @parent.link spec end |