Class: Vcard::V4_0::PropertyValue::Textlist

Inherits:
Vobject::PropertyValue show all
Defined in:
lib/vobject/vcard/v4_0/propertyvalue.rb

Instance Attribute Summary

Attributes inherited from Vobject::PropertyValue

#errors, #norm, #type, #value

Instance Method Summary collapse

Methods inherited from Vobject::PropertyValue

#<=>, #name, #to_norm

Constructor Details

#initialize(val) ⇒ Textlist

Returns a new instance of Textlist.



333
334
335
336
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 333

def initialize(val)
  self.value = val
  self.type = "text"
end

Instance Method Details

#to_hashObject



342
343
344
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 342

def to_hash
  value
end

#to_sObject



338
339
340
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 338

def to_s
  value.map { |m| Text.escape m }.join(",")
end