Sha256: c8161e66e4b064c4c95753dda51c12427ec7f0134861271c790e3a1c666ef8f9

Contents?: true

Size: 621 Bytes

Versions: 4

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

module Trailblazer
  class Finder
    module Activity
      module Process
        # Process sorting Activity
        module Sorting
          extend Trailblazer::Activity::Railway()

          module_function

          def set_sorting_handler(ctx, **)
            return true if ctx[:sorting].nil?

            ctx[:sorting][:handler] = Utils::Extra.apply_handler(
              (Object.const_get(ctx[:orm][:sorting]).__send__ :set_sorting_handler)
            )
          end

          step method(:set_sorting_handler), id: :set_sorting_handler
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trailblazer-finder-0.3.0 lib/trailblazer/finder/activity/process/sorting.rb
trailblazer-finder-0.2.7 lib/trailblazer/finder/activity/process/sorting.rb
trailblazer-finder-0.2.6 lib/trailblazer/finder/activity/process/sorting.rb
trailblazer-finder-0.2.5 lib/trailblazer/finder/activity/process/sorting.rb