Class: Vobject::Vcalendar::PropertyValue::Text
Direct Known Subclasses
ActionValue, Binary, Busytype, ClassValue, Color, EventStatus, Ianatoken, Journalstatus, MethodValue, Todostatus, TranspValue, Uri
Instance Attribute Summary
#errors, #norm, #type, #value
Class Method Summary
collapse
Instance Method Summary
collapse
#<=>, #name, #to_norm
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)
x.tr("\\", "\u007f").gsub(/\n/, "\\n").gsub(/,/, "\\,").
gsub(/;/, "\\;").gsub(/\u007f/, "\\\\\\\\")
end
|
Instance Method Details
#to_hash ⇒ Object
25
26
27
|
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 25
def to_hash
value
end
|
#to_s ⇒ Object
21
22
23
|
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 21
def to_s
Text.escape value
end
|