189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
# File 'lib/trailblazer/activity/dsl/linear/feature/variable_mapping/dsl.rb', line 189
def self.call(user_filter, with_outer_ctx:, **options)
if with_outer_ctx
callable = user_filter call_method = callable.respond_to?(:arity) ? callable : callable.method(:call)
options =
if call_method.arity == 3
Activity::Deprecate.warn Linear::Deprecate.dsl_caller_location,
"The positional argument `outer_ctx` is deprecated, please use the `:outer_ctx` keyword argument.\n#{VariableMapping.deprecation_link}"
options.merge(
filter: Trailblazer::Option(user_filter),
add_variables_class_for_callable: AddVariables::Output::WithOuterContext_Deprecated, )
else
options.merge(
add_variables_class_for_callable: AddVariables::Output::WithOuterContext,
)
end
end
In::FiltersBuilder.(user_filter, type: :Out, **options)
end
|