Method: CEML::Driver#launch
- Defined in:
- lib/ceml/driver.rb
#launch(id, script_collection_id, roleset, *cast) ⇒ Object
67 68 69 70 71 72 73 74 75 |
# File 'lib/ceml/driver.rb', line 67 def launch id, script_collection_id, roleset, *cast script = SCRIPTS[script_collection_id].select{ |s| s.roles_to_cast == roleset }.sort_by{ rand }.first unless script rolesets = SCRIPTS[script_collection_id].map(&:roles_to_cast) raise "matching roleset not found: #{roleset.inspect} in #{rolesets.inspect}" end log "launching #{script.bytecode.inspect} with cast #{cast.inspect}" push id, script.bytecode, *cast end |