Class: Vobject::Vcalendar::PropertyValue::Recur

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

Returns a new instance of Recur.



541
542
543
544
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 541

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

Instance Method Details

#to_hashObject



554
555
556
557
558
559
560
561
562
563
564
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 554

def to_hash
  ret = {}
  value.each do |k, v|
    ret[k] = if v.respond_to?(:to_hash)
               v.to_hash
             else
               v
             end
  end
  ret
end

#to_sObject



546
547
548
549
550
551
552
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 546

def to_s
  ret = []
  value.each do |k, v|
    ret << "#{k.to_s.upcase}=#{valencode(k, v)}"
  end
  ret.join(";")
end