Sha256: 5fe203f690f7fa1b723b159ed433540dc832d8103a125a444d8a38acef6fc3ac

Contents?: true

Size: 452 Bytes

Versions: 1

Compression:

Stored size: 452 Bytes

Contents

# frozen_string_literal: true

# Run typeprofiler:
#
#   typeprof -Ilib sig/typeprof.rb
require "rubanok"

processor = Class.new(Rubanok::Processor) do
  map :q do |q:|
    raw
  end

  match :sort_by, :sort, activate_on: :sort_by do
    having "status", "asc" do
      raw
    end

    default do |sort_by:, sort: "asc"|
      raw
    end
  end
end

processor.project({q: "search", sort_by: "name"})
processor.call([], {q: "search", sort_by: "name"})

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubanok-0.4.0 sig/typeprof.rb