lib/hanami/interactor.rb in hanami-utils-1.3.7 vs lib/hanami/interactor.rb in hanami-utils-1.3.8
- old
+ new
@@ -179,13 +179,21 @@
#
# def call
# # ...
# end
# end
- def initialize(*args)
- super
- ensure
- @__result = ::Hanami::Interactor::Result.new
+ if RUBY_VERSION >= "3.0"
+ def initialize(*args, **kwargs)
+ super
+ ensure
+ @__result = ::Hanami::Interactor::Result.new
+ end
+ else
+ def initialize(*args)
+ super
+ ensure
+ @__result = ::Hanami::Interactor::Result.new
+ end
end
# Triggers the operation and return a result.
#
# All the instance variables will be available in the result.