lib/setsuzoku/pluggable.rb in setsuzoku-0.11.9 vs lib/setsuzoku/pluggable.rb in setsuzoku-0.12.54

- old
+ new

@@ -62,13 +62,15 @@ # # @return [Void] sig(:final) { params(options: T.untyped).void } def register_plugin(**options) options[:plugin_class].config_context[:required_instance_methods].each do |req_method| - - unless options[:required_instance_methods].key?(req_method) - raise Setsuzoku::Exception::UndefinedRequiredMethod.new(registering_instance: self, plugin_class: options[:plugin_class], method_name: req_method) - end + next if options[:required_instance_methods].key?(req_method) + raise Setsuzoku::Exception::UndefinedRequiredMethod.new( + registering_instance: self, + plugin_class: options[:plugin_class], + method_name: req_method + ) end self.plugin_context = self.default_options.merge(options) end end