Sha256: 8a4a98d2be39eb541315defa04e04d6f74400e8aa4c0a4361ed4db25d0dc00c3

Contents?: true

Size: 270 Bytes

Versions: 7

Compression:

Stored size: 270 Bytes

Contents

# frozen_string_literal: true

module Wayfarer
  module Routing
    module Matchers
      Suffix = Struct.new(:suffix) do
        def match(url)
          url.path.end_with?(suffix)
        end

        def params(_)
          {}
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wayfarer-0.4.7 lib/wayfarer/routing/matchers/suffix.rb
wayfarer-0.4.6 lib/wayfarer/routing/matchers/suffix.rb
wayfarer-0.4.5 lib/wayfarer/routing/matchers/suffix.rb
wayfarer-0.4.4 lib/wayfarer/routing/matchers/suffix.rb
wayfarer-0.4.3 lib/wayfarer/routing/matchers/suffix.rb
wayfarer-0.4.2 lib/wayfarer/routing/matchers/suffix.rb
wayfarer-0.4.1 lib/wayfarer/routing/matchers/suffix.rb