Method: Tribe::Actable#spawn
- Defined in:
- lib/tribe/actable.rb
#spawn(klass, actor_options = {}, spawn_options = {}) ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/tribe/actable.rb', line 79 def spawn(klass, = {}, = {}) [:parent] = self @_as.children ||= [] child = nil if [:no_raise_on_failure] begin child = klass.new() rescue Exception => e return false end else child = klass.new() end @_as.children << child return child end |