zeus.ugent.be/lib/filters/ical_filter.rb

12 lines
265 B
Ruby
Raw Normal View History

2016-08-23 18:21:02 +00:00
# This doesn't use the new define syntax yet because item
# is not available there
2016-07-26 22:13:36 +00:00
class IcalFilter < Nanoc::Filter
identifier :ical
def run(_content, _params = {})
cal = Icalendar::Calendar.new
cal.add_event(event_for(item))
cal.to_ical
end
end