Class: Vobject::Vcalendar::PropertyValue::Version

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) ⇒ Version

Returns a new instance of Version.



425
426
427
428
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 425

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

Instance Method Details

#to_hashObject



434
435
436
437
438
439
440
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 434

def to_hash
  if value.length == 1
    value[0]
  else
    value
  end
end

#to_sObject



430
431
432
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 430

def to_s
  value.join(";")
end