diff options
-rw-r--r-- | state.rb | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -152,6 +152,17 @@ class State @holds = Set.new [hold] @hold_params = {} self.class.hold_provides.each do |x| + if x.is_a? Array + worked = false + x.each do |y| + hold.params[y] or next + @hold_params[y] = hold.params[y] + worked = true + end + worked or raise AmbiguousRequest, "None of #{x.join(', ')} defined" + next + end + hold.params[x] or raise AmbiguousRequest, "#{x} undefined" @hold_params[x] = hold.params[x] end |