lib/junk_drawer/callable.rb in junk_drawer-1.8.0 vs lib/junk_drawer/callable.rb in junk_drawer-2.0.0
- old
+ new
@@ -1,9 +1,7 @@
# frozen_string_literal: true
-require 'ruby2_keywords'
-
module JunkDrawer
# error to be thrown by Callable
class CallableError < StandardError
end
@@ -19,11 +17,11 @@
# `ClassMethods` defines a class level method `call` that delegates to
# an instance. It also causes an error to be raised if a public instance
# method is defined with a name other than `call`
module ClassMethods
- ruby2_keywords def call(*args, &block)
- new.(*args, &block)
+ def call(*args, **kwargs, &block)
+ new.(*args, **kwargs, &block)
end
def to_proc
new.to_proc
end