Module: HamlCoffeeAssets::HamlCoffee
- Defined in:
- lib/haml_coffee_assets/haml_coffee.rb
Overview
Handles compilation of Haml CoffeeScript templates to pure JavaScript.
Defined Under Namespace
Classes: Configuration
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
-
.compile(name, source, jst = true) ⇒ String
Compile the Haml CoffeeScript template.
-
.configure {|self.configuration| ... } ⇒ Object
Configure HamlCoffee.
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
104 105 106 |
# File 'lib/haml_coffee_assets/haml_coffee.rb', line 104 def configuration @configuration end |
Class Method Details
.compile(name, source, jst = true) ⇒ String
Compile the Haml CoffeeScript template.
120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/haml_coffee_assets/haml_coffee.rb', line 120 def compile(name, source, jst = true) self.configuration ||= Configuration.new runtime.call('HamlCoffeeAssets.compile', name, source, jst, configuration.namespace, configuration.format, configuration.uglify, configuration.basename, configuration.escapeHtml, configuration.escapeAttributes, configuration.cleanValue, configuration.customHtmlEscape, configuration.customCleanValue, configuration.customPreserve, configuration.customFindAndPreserve, configuration.customSurround, configuration.customSucceed, configuration.customPrecede, configuration.preserveTags, configuration.selfCloseTags, configuration.context) end |
.configure {|self.configuration| ... } ⇒ Object
Configure HamlCoffee
108 109 110 111 |
# File 'lib/haml_coffee_assets/haml_coffee.rb', line 108 def configure self.configuration ||= Configuration.new yield self.configuration end |