lib/rosetta_queue/destinations.rb in bmabey-rosetta_queue-0.2.0 vs lib/rosetta_queue/destinations.rb in bmabey-rosetta_queue-0.3.3

- old
+ new

@@ -1,34 +1,34 @@ module RosettaQueue class Destinations - + @dest = {} class << self attr_reader :dest def define yield self end - + def clear @dest.clear end - + def lookup(dest_name) mapping = dest[dest_name.to_sym] raise "No destination mapping for '#{dest_name}' has been defined!" unless mapping return mapping end - + def map(key, dest) @dest[key] = dest end - + def queue_names @dest.values end end end -end \ No newline at end of file +end