# File lib/randexp/reducer.rb, line 46 def self.union(cell, quantity) case quantity when '?''?' then ['', cell.map {|s| reduce(s)} * ''].pick when :+, '+?''+?' then raise "Sorry, \"(...)+\" is too vague, try setting a range: \"(...){1, 3}\"" when :*, '*?''*?' then raise "Sorry, \"(...)*\" is too vague, try setting a range: \"(...){0, 3}\"" when Range then quantity.pick.of { cell.map {|s| reduce(s)} * '' } * '' when Integer then quantity.of { cell.map {|s| reduce(s)} * '' } * '' when nil then cell.map {|s| reduce(s)} * '' end end