123456789_123456789_123456789_123456789_123456789_

Class: ActionDispatch::PermissionsPolicy

Relationships & Source Files
Namespace Children
Modules:
Classes:
Inherits: Object
Defined in: actionpack/lib/action_dispatch/http/permissions_policy.rb

Constant Summary

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new {|_self| ... } ⇒ PermissionsPolicy

Yields:

  • (_self)

Yield Parameters:

  • _self (PermissionsPolicy)

    the object that the method was called on

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/http/permissions_policy.rb', line 90

def initialize
  @directives = {}
  yield self if block_given?
end

Instance Attribute Details

#directives (readonly)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/http/permissions_policy.rb', line 88

attr_reader :directives

Instance Method Details

#build(context = nil)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/http/permissions_policy.rb', line 109

def build(context = nil)
  build_directives(context).compact.join("; ")
end

#initialize_copy(other)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/http/permissions_policy.rb', line 95

def initialize_copy(other)
  @directives = other.directives.deep_dup
end