Class: Flowckerc::SolverClass::AtomExecContext

Inherits:
Object
  • Object
show all
Defined in:
lib/flowckerc.rb

Instance Method Summary collapse

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

#optionsObject



156
157
158
# File 'lib/flowckerc.rb', line 156

def options
  @parent.options
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