lib/emittance/dispatcher/registration_map.rb in emittance-1.1.0 vs lib/emittance/dispatcher/registration_map.rb in emittance-2.0.0.pre.1

- old
+ new

@@ -6,11 +6,11 @@ class Dispatcher ## # A proxy for a hash. Identifies special identifiers. # class RegistrationMap - SPECIAL_IDENTIFIER_REGEX = /^\@/ + SPECIAL_IDENTIFIER_REGEX = /^\@/.freeze class << self # @param identifier the identifier we want to know information about # @return [Boolean] true if the identifier is a special one, false otherwise def special_identifier?(identifier) @@ -34,9 +34,13 @@ # @param blk block passed to +Hash#each_key+ # @return [RegistrationMap] self def each_key(*args, &blk) reg_map.each_key(*args, &blk) self + end + + def clear + @reg_map = {} end private attr_reader :reg_map