Class: Vobject::Vcalendar::PropertyValue::Text
- Inherits:
-
PropertyValue
- Object
- PropertyValue
- Vobject::Vcalendar::PropertyValue::Text
- Defined in:
- lib/vobject/vcalendar/propertyvalue.rb
Direct Known Subclasses
ActionValue, Binary, Busytype, ClassValue, Color, EventStatus, Ianatoken, Journalstatus, MethodValue, Todostatus, TranspValue, Uri
Instance Attribute Summary
Attributes inherited from PropertyValue
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(val) ⇒ Text
constructor
A new instance of Text.
- #to_hash ⇒ Object
- #to_s ⇒ Object
Methods inherited from PropertyValue
Constructor Details
#initialize(val) ⇒ Text
Returns a new instance of Text.
16 17 18 19 |
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 16 def initialize(val) self.value = val self.type = "text" end |
Class Method Details
.escape(x) ⇒ Object
9 10 11 12 13 |
# 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 |