Class: Requirejs::Tilt::DirectiveProcessor
- Inherits:
-
Sprockets::DirectiveProcessor
- Object
- Sprockets::DirectiveProcessor
- Requirejs::Tilt::DirectiveProcessor
- Defined in:
- lib/requirejs/tilt/directive_processor.rb
Instance Method Summary collapse
- #dump_config ⇒ Object
-
#evaluate(scope, locals, &block) ⇒ Object
Internal: Compile the template Stylus using this instance options.
Instance Method Details
#dump_config ⇒ Object
30 31 32 33 |
# File 'lib/requirejs/tilt/directive_processor.rb', line 30 def dump_config process_include_directive(name) ::Requirejs::BuildConfig.new(file).save({ 'include' => @include_modules }) end |
#evaluate(scope, locals, &block) ⇒ Object
Internal: Compile the template Stylus using this instance options. The current ‘scope’ and given ‘locals’ are ignored and the output is cached.
Returns a String with the compiled stylesheet with CSS syntax.
21 22 23 24 25 26 27 28 |
# File 'lib/requirejs/tilt/directive_processor.rb', line 21 def evaluate(scope, locals, &block) @result = super if process_rjs? Requirejs.config.setup_directories dump_config end @result end |