Class: Builder::IcalPlugin

Inherits:
ActionView::TemplateHandler
  • Object
show all
Includes:
ActionView::TemplateHandlers::Compilable
Defined in:
lib/ical_template.rb

Instance Method Summary collapse

Instance Method Details

#compile(template) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/ical_template.rb', line 5

def compile(template)
  "_set_controller_content_type(Mime::ICS);" +
    "cal = ::Builder::Ical.new;" +
    "self.output_buffer = cal.to_s;" +
    template.source +
    ";cal.to_s;"
end