Module: Erector::Externals
- Included in:
- Widget
- Defined in:
- lib/erector/externals.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #render_externals(options_to_external_renderer = {}) ⇒ Object
- #render_with_externals(options_to_external_renderer = {}) ⇒ Object
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/erector/externals.rb', line 3 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#render_externals(options_to_external_renderer = {}) ⇒ Object
89 90 91 92 93 94 95 |
# File 'lib/erector/externals.rb', line 89 def render_externals( = {}) output_for_externals = Erector::Output.new = output. externalizer = ExternalRenderer.new({:classes => }.merge()) externalizer._render(:output => output_for_externals) output_for_externals.to_a end |
#render_with_externals(options_to_external_renderer = {}) ⇒ Object
80 81 82 83 84 85 86 87 |
# File 'lib/erector/externals.rb', line 80 def render_with_externals( = {}) output = Erector::Output.new self.to_a(:output => output) # render all the externals onto this new output buffer = output..to_a renderer = ExternalRenderer.new({:classes => }.merge()) externals = renderer.to_a(:output => output) output.to_a end |