lib/eco/api/usecases/use_case.rb in eco-helpers-2.4.9 vs lib/eco/api/usecases/use_case.rb in eco-helpers-2.5.1

- old
+ new

@@ -71,16 +71,19 @@ # in the use case definition # @note this only works when the use case was defined # via an children class of `Eco::API::Common::Loaders::Base` def set_session_n_options(session:, options: @options) return false unless callback_from_loader? + use_case_self = self callback_self.instance_eval do + next unless self.is_a?(Eco::API::Common::Loaders::CaseBase) # `self` is the use case itself (when used the Loader) @session = session @options = options + @usecase = use_case_self end true - end + end end end end end