class Apiphobic::Matchers::AcceptHeader
Attributes
accept_header[RW]
application_name[RW]
request[RW]
Public Class Methods
new(application_name:)
click to toggle source
# File lib/apiphobic/matchers/accept_header.rb, line 12 def initialize(application_name:) self.application_name = application_name end
Public Instance Methods
matches?(request)
click to toggle source
# File lib/apiphobic/matchers/accept_header.rb, line 16 def matches?(request) self.request = request self.accept_header = ::Apiphobic::AcceptHeader.new(request.accept_header, application_name: application_name) accept_header.valid? end