Module: Apill::Matchers::Generic

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accept_headerObject

Returns the value of attribute accept_header.



6
7
8
# File 'lib/apill/matchers/generic.rb', line 6

def accept_header
  @accept_header
end

#applicationObject

Returns the value of attribute application.



6
7
8
# File 'lib/apill/matchers/generic.rb', line 6

def application
  @application
end

#requestObject

Returns the value of attribute request.



6
7
8
# File 'lib/apill/matchers/generic.rb', line 6

def request
  @request
end

Instance Method Details

#initialize(**args) ⇒ Object



10
11
12
13
14
# File 'lib/apill/matchers/generic.rb', line 10

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

#matches?(request) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/apill/matchers/generic.rb', line 16

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