lib/dispatch-rider/registrars/base.rb in dispatch-rider-2.1.0 vs lib/dispatch-rider/registrars/base.rb in dispatch-rider-2.2.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
# This is the base class for the registrars.
# It defines the interface that other registrars inherit.
# This is an abstract class.
# The child classes inheriting this interface must define the 'value' method.
module DispatchRider
@@ -26,14 +28,12 @@
store.delete(name.to_sym)
self
end
def fetch(name)
- begin
- store.fetch(name.to_sym)
- rescue IndexError
- raise NotRegistered, name
- end
+ store.fetch(name.to_sym)
+ rescue IndexError
+ raise NotRegistered, name
end
end
end
end