Class: Vcard::V3_0::PropertyValue::Utcoffset

Inherits:
Vobject::PropertyValue show all
Defined in:
lib/vobject/vcard/v3_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) ⇒ Utcoffset

Returns a new instance of Utcoffset.



251
252
253
254
# File 'lib/vobject/vcard/v3_0/propertyvalue.rb', line 251

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

Instance Method Details

#to_hashObject



262
263
264
# File 'lib/vobject/vcard/v3_0/propertyvalue.rb', line 262

def to_hash
  value
end

#to_sObject



256
257
258
259
260
# File 'lib/vobject/vcard/v3_0/propertyvalue.rb', line 256

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