I am attempting to add a freebusy property to a calendar. I've done my
best to try to understand the implementation by looking at the
documentation and spec files, but I'm having difficulty nonetheless.
What am I doing wrong?
dtstart =
DateTime.parse("2010-10-10T00:00:00.000Z").to_ri_cal_property_value
dtend =
DateTime.parse("2010-10-20T00:00:00.000Z").to_ri_cal_property_value
period = RiCal::PropertyValue::Period.new(nil, :value =>
"#{dtstart.value}/#{dtend.value}")
cal = RiCal.Calendar do |cal|
cal.freebusy do |freebusy|
freebusy.add_freebusy period
end
end
Here is my trace:
https://gist.github.com/a123f660281bb2323cde
I've confirmed my period is not null
ruby-1.9.2-p290 :030 > period.duration
=> :+P10D
I can only assume I'm calling add_freebusy on the wrong object in some
way.
Thanks!