Module: YPetri::Simulation::Dependency
- Included in:
- MarkingVector
- Defined in:
- lib/y_petri/simulation/dependency.rb
Class Method Summary collapse
-
.delegate_to_simulation!(*method_symbols) ⇒ Object
Delegates supplied method symbols to the protected (and private) methods of the simulation.
Class Method Details
.delegate_to_simulation!(*method_symbols) ⇒ Object
Delegates supplied method symbols to the protected (and private) methods of the simulation.
33 34 35 36 37 38 39 |
# File 'lib/y_petri/simulation/dependency.rb', line 33 def self.delegate_to_simulation! *method_symbols method_symbols.each do |symbol| module_exec do define_method symbol do |*aa, &b| simulation.send symbol, *aa, &b end end end end |