def initialize(apps, catch=404) @apps = []; @has_app = {} apps.each { |app| add app } @catch = {} [*catch].each { |status| @catch[status] = true } end
Another way to look at it: an l-value splat is greedy and contains as many corresponding r-values as possible.