class Roda::RodaPlugins::ContentSecurityPolicy::Policy
def append_formatted_value(s, v)
Array :: only accepts 2 element arrays, joins them with - and
Symbol :: Substitutes _ with - and surrounds with '
String :: used verbatim
Handle three types of values when formatting the header:
def append_formatted_value(s, v) case v when String s << ' ' << v when Array case v.length when 2 s << " '" << v.join('-') << "'" else raise RodaError, "unsupported CSP value used: #{v.inspect}" end when Symbol s << " '" << v.to_s.gsub('_', '-') << "'" else raise RodaError, "unsupported CSP value used: #{v.inspect}" end end