module Roda::RodaPlugins::PermissionsPolicy::ResponseMethods

def initialize

Unset any permissions policy when reinitializing
def initialize
  super
  @permissions_policy &&= nil
end

def permissions_policy

The current permissions policy to be used for this response.
def permissions_policy
  @permissions_policy ||= roda_class.opts[:permissions_policy].dup
end

def set_default_headers

Set the appropriate permissions policy header.
def set_default_headers
  super
  (@permissions_policy || roda_class.opts[:permissions_policy]).set_header(headers)
end