Class: Packr::Rails::Template
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- Packr::Rails::Template
- Defined in:
- lib/packr/rails/template.rb
Class Method Summary collapse
Instance Method Summary collapse
- #evaluate(scope, locals, &block) ⇒ Object
- #initialize_engine ⇒ Object
- #packr_options(scope) ⇒ Object
- #packr_options_from_rails(scope) ⇒ Object
- #prepare ⇒ Object
- #syntax ⇒ Object
Class Method Details
.engine_initialized? ⇒ Boolean
8 9 10 |
# File 'lib/packr/rails/template.rb', line 8 def self.engine_initialized? defined?(::Packr) end |
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
23 24 25 |
# File 'lib/packr/rails/template.rb', line 23 def evaluate(scope, locals, &block) Packr.pack(data, (scope)) end |
#initialize_engine ⇒ Object
12 13 14 |
# File 'lib/packr/rails/template.rb', line 12 def initialize_engine require_template_library 'packr' end |
#packr_options(scope) ⇒ Object
27 28 29 |
# File 'lib/packr/rails/template.rb', line 27 def (scope) (scope) end |
#packr_options_from_rails(scope) ⇒ Object
31 32 33 |
# File 'lib/packr/rails/template.rb', line 31 def (scope) scope.environment.context_class.packr_config end |
#prepare ⇒ Object
20 21 |
# File 'lib/packr/rails/template.rb', line 20 def prepare end |
#syntax ⇒ Object
16 17 18 |
# File 'lib/packr/rails/template.rb', line 16 def syntax :packr end |