Class: Awestruct::Extensions::CoffeeScriptTransform
- Inherits:
-
Object
- Object
- Awestruct::Extensions::CoffeeScriptTransform
- Defined in:
- lib/awestruct/extensions/coffeescripttransform.rb
Instance Method Summary collapse
Instance Method Details
#transform(site, page, input) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/awestruct/extensions/coffeescripttransform.rb', line 11 def transform(site, page, input) ext = File.extname(page.output_path)[1..-1].to_sym case ext when :html encoding = 'UTF-8' encoding = site.encoding unless site.encoding.nil? return compile(input, encoding) end return input end |