Class: Vcard::V3_0::PropertyValue::Text
- Inherits:
-
Vobject::PropertyValue
- Object
- Vobject::PropertyValue
- Vcard::V3_0::PropertyValue::Text
- Defined in:
- lib/vobject/vcard/v3_0/propertyvalue.rb
Direct Known Subclasses
Binary, ClassValue, Ianatoken, Kindvalue, Phonenumber, Profilevalue, Uri
Instance Attribute Summary
Attributes inherited from Vobject::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 Vobject::PropertyValue
Constructor Details
#initialize(val) ⇒ Text
Returns a new instance of Text.
25 26 27 28 |
# File 'lib/vobject/vcard/v3_0/propertyvalue.rb', line 25 def initialize(val) self.value = val self.type = "text" end |
Class Method Details
.escape(x) ⇒ Object
8 9 10 11 |
# File 'lib/vobject/vcard/v3_0/propertyvalue.rb', line 8 def escape(x) # temporarily escape \\ as \u007f, which is banned from text x.tr("\\", "\u007f").gsub(/\n/, "\\n").gsub(/,/, "\\,").gsub(/;/, "\\;").gsub(/\u007f/, "\\\\") end |