Module: Drillbit::Matchers::Generic
- Included in:
- AcceptHeader, Version
- Defined in:
- lib/drillbit/matchers/generic.rb
Instance Attribute Summary collapse
-
#accept_header ⇒ Object
Returns the value of attribute accept_header.
-
#application ⇒ Object
Returns the value of attribute application.
-
#request ⇒ Object
Returns the value of attribute request.
Instance Method Summary collapse
Instance Attribute Details
#accept_header ⇒ Object
Returns the value of attribute accept_header.
7 8 9 |
# File 'lib/drillbit/matchers/generic.rb', line 7 def accept_header @accept_header end |
#application ⇒ Object
Returns the value of attribute application.
7 8 9 |
# File 'lib/drillbit/matchers/generic.rb', line 7 def application @application end |
#request ⇒ Object
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
17 18 19 |
# File 'lib/drillbit/matchers/generic.rb', line 17 def matches?(request) self.request = Requests::Base.resolve(request) end |