]> git.openstreetmap.org Git - rails.git/blob - config/initializers/r2.rb
Standardise on double quoted strings
[rails.git] / config / initializers / r2.rb
1 class R2Template < Tilt::Template
2   self.default_mime_type = "text/css"
3
4   def self.engine_initialized?
5     defined? ::R2
6   end
7
8   def initialize_engine
9     require_template_library "r2"
10   end
11
12   def prepare
13     @output = R2.r2(data)
14   end
15
16   def evaluate(_scope, _locals, &_block)
17     @output
18   end
19 end
20
21 Rails.application.assets.register_engine ".r2", R2Template