Class: ActionDispatch::PermissionsPolicy
- Inherits:
-
Object
- Object
- ActionDispatch::PermissionsPolicy
- Defined in:
- lib/action_dispatch/http/permissions_policy.rb
Defined Under Namespace
Modules: Request Classes: Middleware
Instance Attribute Summary collapse
-
#directives ⇒ Object
readonly
Returns the value of attribute directives.
Instance Method Summary collapse
- #build(context = nil) ⇒ Object
-
#initialize {|_self| ... } ⇒ PermissionsPolicy
constructor
A new instance of PermissionsPolicy.
- #initialize_copy(other) ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ PermissionsPolicy
Returns a new instance of PermissionsPolicy.
90 91 92 93 |
# File 'lib/action_dispatch/http/permissions_policy.rb', line 90 def initialize @directives = {} yield self if block_given? end |
Instance Attribute Details
#directives ⇒ Object (readonly)
Returns the value of attribute directives.
88 89 90 |
# File 'lib/action_dispatch/http/permissions_policy.rb', line 88 def directives @directives end |
Instance Method Details
#build(context = nil) ⇒ Object
109 110 111 |
# File 'lib/action_dispatch/http/permissions_policy.rb', line 109 def build(context = nil) build_directives(context).compact.join("; ") end |
#initialize_copy(other) ⇒ Object
95 96 97 |
# File 'lib/action_dispatch/http/permissions_policy.rb', line 95 def initialize_copy(other) @directives = other.directives.deep_dup end |