module Gamefic::Scripting::Entities
def pick! *args
-
(Gamefic::Entity)
-
Parameters:
-
args
(Array
) --
Raises:
-
(RuntimeError)
- if a unique match was not found.
def pick! *args matches = find(*args) raise "no entity matching '#{args.inspect}'" if matches.empty? raise "multiple entities matching '#{args.inspect}': #{matches.join_and}" unless matches.one? matches.first end