Class: Rack::ContentSecurityPolicy::DirectiveVal
- Inherits:
-
Object
- Object
- Rack::ContentSecurityPolicy::DirectiveVal
- Defined in:
- lib/rack/content_security_policy/contracts.rb
Class Method Summary collapse
Class Method Details
.to_s ⇒ Object
21 22 23 |
# File 'lib/rack/content_security_policy/contracts.rb', line 21 def self.to_s 'A CSP directive value must be a String or Boolean' end |
.valid?(val) ⇒ Boolean
17 18 19 |
# File 'lib/rack/content_security_policy/contracts.rb', line 17 def self.valid?(val) Contract.valid?(val, Contracts::Or[String, Contracts::Bool]) end |