In the icalendar gem's readme they have this example code:
cal = Icalendar::Calendar.new
cal.event do |e|
e.dtstart = Icalendar::Values::Date.new('20050428')
e.dtend = Icalendar::Values::Date.new('20050429')
e.summary = "Meeting with the man."
e.description = "Have a long lunch meeting and decide nothing..."
e.ip_class = "PRIVATE"
end
cal.publish
What does the cal.publish
method do? There is no documentation for it, and the source code only shows this:
def publish
self.ip_method = 'PUBLISH'
end
That doesn't help—what does ip_method
do??
If anyone could explain this, it would be a great help.
There is an optional_single_property
method/hook, see Github code. This method sets the publish method (refers to iTip).
From maptiming.com:
The ‘methods’ are not explained in the iCalendar standard, but in the iTIP standard, and reading of this second standard clarified a lot. These are the supported methods as listed on page 8 of the standard:
PUBLISH: Used to publish an iCalendar object to one or more “Calendar Users”. There is no interactivity between the publisher and any other “Calendar User”. An example might include a baseball team publishing its schedule to the public.
RFC 5546 explains the iTip standard.
Another resource mentioned:
iCalendar used the method PUBLISH instead of REQUEST. Using REQUEST, it just brings up the calendar, while using PUBLISH imported it."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With