Class: Vobject::Vcalendar::PropertyValue::Time

Inherits:
PropertyValue show all
Defined in:
lib/vobject/vcalendar/propertyvalue.rb

Instance Attribute Summary

Attributes inherited from PropertyValue

#errors, #norm, #type, #value

Instance Method Summary collapse

Methods inherited from PropertyValue

#<=>, #name, #to_norm

Constructor Details

#initialize(val) ⇒ Time

Returns a new instance of Time.



375
376
377
378
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 375

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

Instance Method Details

#to_hashObject



386
387
388
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 386

def to_hash
  value
end

#to_sObject



380
381
382
383
384
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 380

def to_s
  ret = "#{value[:hour]}#{value[:min]}#{value[:sec]}"
  ret = ret + "Z" if value[:utc]
  ret
end