Module: CoffeeBeans::Handlers::CoffeeScript
- Defined in:
- lib/coffeebeans.rb
Class Method Summary collapse
Class Method Details
.call(template) ⇒ Object
10 11 12 13 |
# File 'lib/coffeebeans.rb', line 10 def self.call(template) compiled_source = erb_handler.call(template) "::CoffeeScript.compile(begin;#{compiled_source};end)" end |
.erb_handler ⇒ Object
6 7 8 |
# File 'lib/coffeebeans.rb', line 6 def self.erb_handler @@erb_handler ||= ActionView::Template.registered_template_handler(:erb) end |