Sha256: 1ddedfd1841efa9623d4e72261072bd78dada526be670bc4189dc09b71156f9a
Contents?: true
Size: 570 Bytes
Versions: 8
Compression:
Stored size: 570 Bytes
Contents
module Trailblazer class Operation class DeprecatedOptions < Option def self.call!(proc, direction, options, flow_options, *args) if proc.is_a?(Proc) && proc.arity == 1 deprecate(proc) proc.(options) elsif proc.method(:call).arity == 1 deprecate(proc) proc.(options) else super end end def self.deprecate(proc) warn "[Trailblazer] Please use the step API `def my_step!(options, **)` for your step: #{proc}" end end # DeprecatedOptions end end
Version data entries
8 entries across 8 versions & 1 rubygems