class ApiConstraints

Public Class Methods

new(options) click to toggle source
# File lib/api_constraints.rb, line 2
def initialize(options)
  @version = options[:version]
  @default = options[:default]
end

Public Instance Methods

matches?(req) click to toggle source
# File lib/api_constraints.rb, line 7
def matches?(req)
  @default || req.headers['Accept'].include?("application/meta_notification.v#{@version}")
end