Sha256: 728c210881941ed9701cc344790816b766db090eaee0388a5a5a4fbb26d8d5b6

Contents?: true

Size: 424 Bytes

Versions: 4

Compression:

Stored size: 424 Bytes

Contents

# frozen_string_literal: true

module Wayfarer
  module Routing
    module Matchers
      Host = Struct.new(:host) do
        # rubocop:disable Style/CaseEquality
        def match(url)
          # url.host excludes the port
          # TODO: Test case, docs
          host === url.authority
        end
        # rubocop:enable Style/CaseEquality

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wayfarer-0.4.7 lib/wayfarer/routing/matchers/host.rb
wayfarer-0.4.6 lib/wayfarer/routing/matchers/host.rb
wayfarer-0.4.5 lib/wayfarer/routing/matchers/host.rb
wayfarer-0.4.4 lib/wayfarer/routing/matchers/host.rb