Class: Vobject::Vcalendar::PropertyValue::Utcoffset

Inherits:
PropertyValue
  • Object
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) ⇒ Utcoffset

Returns a new instance of Utcoffset.



392
393
394
395
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 392

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

Instance Method Details

#to_hashObject



403
404
405
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 403

def to_hash
  value
end

#to_sObject



397
398
399
400
401
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 397

def to_s
  ret = "#{value[:sign]}#{value[:hr]}#{value[:min]}"
  ret += value[:sec] if value[:sec]
  ret
end