class Rack::ContentSecurityPolicy::DirectiveKey
Custom Contracts See : egonschiele.github.io/contracts.ruby/
Public Class Methods
to_s()
click to toggle source
# File lib/rack/content_security_policy/contracts.rb, line 11 def self.to_s 'A CSP directive key must be one or more lowercase ASCII (a-z) characters with optional dashes (-)' end
valid?(val)
click to toggle source
# File lib/rack/content_security_policy/contracts.rb, line 7 def self.valid?(val) Contract.valid?(val, /^[[a-z]+\-?]+$/) end