Class: Vobject::Vcalendar::PropertyValue::Periodlist
Instance Attribute Summary
#errors, #norm, #type, #value
Instance Method Summary
collapse
#<=>, #name, #to_norm
Constructor Details
Returns a new instance of Periodlist.
459
460
461
462
|
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 459
def initialize(val)
self.value = val
self.type = "periodlist"
end
|
Instance Method Details
#to_hash ⇒ Object
473
474
475
|
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 473
def to_hash
value.map { |m| m.each { |k, v| m[k] = v.to_hash } }
end
|
#to_s ⇒ Object
464
465
466
467
468
469
470
471
|
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 464
def to_s
value.map do |m|
ret = m[:start].to_s + "/"
ret += m[:end].to_s if m.has_key? :end
ret += m[:duration].to_s if m.has_key? :duration
ret
end.join(",")
end
|