Method: Vcard.encode_paramvalue

Defined in:
lib/vcard.rb

.encode_paramvalue(value) ⇒ Object



220
221
222
223
224
225
226
227
228
# File 'lib/vcard.rb', line 220

def self.encode_paramvalue(value)
  if value =~ Bnf::ALL_SAFECHARS
    value
  elsif value =~ Bnf::ALL_QSAFECHARS
    %Q{"#{value}"}
  else
    raise ::Vcard::Unencodable, "param-value #{value.inspect}"
  end
end