Class: Vcard::V4_0::PropertyValue::Time
Instance Attribute Summary
#errors, #norm, #type, #value
Instance Method Summary
collapse
#<=>, #name, #to_norm
Constructor Details
#initialize(val) ⇒ Time
Returns a new instance of Time.
264
265
266
267
|
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 264
def initialize(val)
self.value = val
self.type = "time"
end
|
Instance Method Details
#to_hash ⇒ Object
278
279
280
|
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 278
def to_hash
value
end
|
#to_s ⇒ Object
269
270
271
272
273
274
275
276
|
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 269
def to_s
ret = ""
ret << value[:hour] if value[:hour]
ret << value[:min] if value[:min]
ret << value[:sec] if value[:sec]
ret << value[:zone] if value[:zone]
ret
end
|