Class: HJ7::Coffee::CoffeeConverter
- Inherits:
-
Jekyll::Converter
- Object
- Jekyll::Converter
- HJ7::Coffee::CoffeeConverter
- Defined in:
- lib/hj7/coffee_converter.rb
Instance Method Summary collapse
Instance Method Details
#convert(content) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/hj7/coffee_converter.rb', line 17 def convert(content) begin CoffeeScript.compile content rescue StandardError => e puts "CoffeeScript error:" + e. end end |
#matches(ext) ⇒ Object
9 10 11 |
# File 'lib/hj7/coffee_converter.rb', line 9 def matches(ext) ext =~ /coffee/i end |
#output_ext(ext) ⇒ Object
13 14 15 |
# File 'lib/hj7/coffee_converter.rb', line 13 def output_ext(ext) ".js" end |