# File lib/rhc/cartridge_helpers.rb, line 55 def web_carts_only lambda{ |cart| next cart unless cart.is_a? Array name = cart.instance_variable_get(:@for) matching = cart.select{ |c| not c.only_in_existing? } if matching.empty? raise RHC::MultipleCartridgesException, "You must select only a single web cartridge. '#{name}' matches web cartridges." elsif matching.size == 1 use_cart(matching.first, name) else matching.instance_variable_set(:@for, name) matching end } end