Sha256: b195c5b4c5d70d8da57958350561f533ba7c23d1669ad84b0f5f0a0488ee0baf

Contents?: true

Size: 520 Bytes

Versions: 21

Compression:

Stored size: 520 Bytes

Contents

# frozen_string_literal: true
require 'drillbit/configuration'
require 'drillbit/matchers/generic'

module  Drillbit
module  Matchers
class   Version
  include Generic

  attr_accessor :version_constraint,
                :default_version

  def matches?(request)
    super

    requested_version == version_constraint
  end

  private

  def requested_version
    accept_header.version || default_version
  end

  def default_version
    @default_version || Drillbit.configuration.default_api_version
  end
end
end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
drillbit-2.11.0 lib/drillbit/matchers/version.rb
drillbit-2.10.0 lib/drillbit/matchers/version.rb
drillbit-2.9.1 lib/drillbit/matchers/version.rb
drillbit-2.9.0 lib/drillbit/matchers/version.rb
drillbit-2.8.0 lib/drillbit/matchers/version.rb
drillbit-2.7.0 lib/drillbit/matchers/version.rb
drillbit-2.6.0 lib/drillbit/matchers/version.rb
drillbit-2.5.0 lib/drillbit/matchers/version.rb
drillbit-2.4.0 lib/drillbit/matchers/version.rb
drillbit-2.3.1 lib/drillbit/matchers/version.rb
drillbit-2.3.0 lib/drillbit/matchers/version.rb
drillbit-2.2.2 lib/drillbit/matchers/version.rb
drillbit-2.2.1 lib/drillbit/matchers/version.rb
drillbit-2.2.0 lib/drillbit/matchers/version.rb
drillbit-2.1.0 lib/drillbit/matchers/version.rb
drillbit-2.0.1 lib/drillbit/matchers/version.rb
drillbit-2.0.0 lib/drillbit/matchers/version.rb
drillbit-1.1.0 lib/drillbit/matchers/version.rb
drillbit-1.0.1 lib/drillbit/matchers/version.rb
drillbit-1.0.0 lib/drillbit/matchers/version.rb