class Vobject::Vcalendar::PropertyValue::Text
Public Class Methods
escape(x)
click to toggle source
# File lib/vobject/vcalendar/propertyvalue.rb, line 9 def escape(x) # temporarily escape \\ as \u007f, which is banned from text x.tr("\\", "\u007f").gsub(/\n/, "\\n").gsub(/,/, "\\,"). gsub(/;/, "\\;").gsub(/\u007f/, "\\\\\\\\") end
new(val)
click to toggle source
# File lib/vobject/vcalendar/propertyvalue.rb, line 16 def initialize(val) self.value = val self.type = "text" end
Public Instance Methods
to_hash()
click to toggle source
# File lib/vobject/vcalendar/propertyvalue.rb, line 25 def to_hash value end
to_s()
click to toggle source
# File lib/vobject/vcalendar/propertyvalue.rb, line 21 def to_s Text.escape value end