Class: Vcard::V4_0::PropertyValue::Address
Instance Attribute Summary
#errors, #norm, #type, #value
Instance Method Summary
collapse
#<=>, #name, #to_norm
Constructor Details
#initialize(val) ⇒ Address
Returns a new instance of Address.
383
384
385
386
|
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 383
def initialize(val)
self.value = val
self.type = "text"
end
|
Instance Method Details
#to_hash ⇒ Object
399
400
401
|
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 399
def to_hash
value
end
|
#to_s ⇒ Object
388
389
390
391
392
393
394
395
396
397
|
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 388
def to_s
ret = Text.listencode value[:pobox]
ret += ";#{Text.listencode value[:ext]}"
ret += ";#{Text.listencode value[:street]}"
ret += ";#{Text.listencode value[:locality]}"
ret += ";#{Text.listencode value[:region]}"
ret += ";#{Text.listencode value[:code]}"
ret += ";#{Text.listencode value[:country]}"
ret
end
|