Class: Drillbit::Matchers::Version

Inherits:
Object
  • Object
show all
Includes:
Generic
Defined in:
lib/drillbit/matchers/version.rb

Instance Attribute Summary collapse

Attributes included from Generic

#accept_header, #application, #request

Instance Method Summary collapse

Methods included from Generic

#initialize

Instance Attribute Details

#default_version=(value) ⇒ Object

Sets the attribute default_version

Parameters:

  • value

    the value to set the attribute default_version to.



12
13
14
# File 'lib/drillbit/matchers/version.rb', line 12

def default_version=(value)
  @default_version = value
end

#version_constraintObject

Returns the value of attribute version_constraint.



11
12
13
# File 'lib/drillbit/matchers/version.rb', line 11

def version_constraint
  @version_constraint
end

Instance Method Details

#matches?(request) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
17
18
# File 'lib/drillbit/matchers/version.rb', line 14

def matches?(request)
  super

  requested_version == version_constraint
end