Class: Sprockets::CocoTemplate
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- Sprockets::CocoTemplate
- Defined in:
- lib/sprockets/coco.rb
Constant Summary collapse
- @@default_bare =
false
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.default_bare ⇒ Object
9 10 11 |
# File 'lib/sprockets/coco.rb', line 9 def self. @@default_bare end |
.default_bare=(value) ⇒ Object
13 14 15 |
# File 'lib/sprockets/coco.rb', line 13 def self.(value) @@default_bare = value end |
.engine_initialized? ⇒ Boolean
17 18 19 |
# File 'lib/sprockets/coco.rb', line 17 def self.engine_initialized? defined? ::Coco end |
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
31 32 33 |
# File 'lib/sprockets/coco.rb', line 31 def evaluate(scope, locals, &block) @output ||= Coco.compile(data, ) end |
#initialize_engine ⇒ Object
21 22 23 |
# File 'lib/sprockets/coco.rb', line 21 def initialize_engine require_template_library 'ruby-coco' end |
#prepare ⇒ Object
25 26 27 28 29 |
# File 'lib/sprockets/coco.rb', line 25 def prepare if !.key?(:bare) [:bare] = self.class. end end |