Module: Drillbit::Matchers::Generic

Included in:
AcceptHeader, Version
Defined in:
lib/drillbit/matchers/generic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accept_headerObject

Returns the value of attribute accept_header.



7
8
9
# File 'lib/drillbit/matchers/generic.rb', line 7

def accept_header
  @accept_header
end

#applicationObject

Returns the value of attribute application.



7
8
9
# File 'lib/drillbit/matchers/generic.rb', line 7

def application
  @application
end

#requestObject

Returns the value of attribute request.



7
8
9
# File 'lib/drillbit/matchers/generic.rb', line 7

def request
  @request
end

Instance Method Details

#initialize(**args) ⇒ Object



11
12
13
14
15
# File 'lib/drillbit/matchers/generic.rb', line 11

def initialize(**args)
  args.each do |variable, value|
    __send__("#{variable}=", value)
  end
end

#matches?(request) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/drillbit/matchers/generic.rb', line 17

def matches?(request)
  self.request = Requests::Base.resolve(request)
end