Class: Tilt::BlueClothTemplate
- Inherits:
-
Template
show all
- Defined in:
- lib/tilt/markdown.rb
Overview
Instance Attribute Summary
Attributes inherited from Template
#data, #file, #line, #options
Class Method Summary
(collapse)
Instance Method Summary
(collapse)
Methods inherited from Template
#basename, cached_evaluate, #compile_template_method, #eval_file, #evaluate_source, #initialize, #name, #render
Constructor Details
This class inherits a constructor from Tilt::Template
Class Method Details
+ (Boolean) engine_initialized?
127
128
129
|
# File 'lib/tilt/markdown.rb', line 127
def self.engine_initialized?
defined? ::BlueCloth
end
|
Instance Method Details
- (Object) evaluate(scope, locals, &block)
140
141
142
|
# File 'lib/tilt/markdown.rb', line 140
def evaluate(scope, locals, &block)
@output ||= @engine.to_html
end
|
- (Object) initialize_engine
131
132
133
|
# File 'lib/tilt/markdown.rb', line 131
def initialize_engine
require_template_library 'bluecloth'
end
|
- (Object) prepare
135
136
137
138
|
# File 'lib/tilt/markdown.rb', line 135
def prepare
@engine = BlueCloth.new(data, options)
@output = nil
end
|