Class: Triplet::Template
- Inherits:
-
Object
- Object
- Triplet::Template
- Includes:
- DSL
- Defined in:
- lib/triplet/template.rb
Constant Summary
Constants included from DSL
Instance Method Summary collapse
-
#initialize(output_buffer = ActionView::OutputBuffer.new, &block) ⇒ Template
constructor
A new instance of Template.
- #to_s ⇒ Object
Methods included from DSL
Constructor Details
#initialize(output_buffer = ActionView::OutputBuffer.new, &block) ⇒ Template
Returns a new instance of Template.
7 8 9 10 11 |
# File 'lib/triplet/template.rb', line 7 def initialize(output_buffer = ActionView::OutputBuffer.new, &block) @output_buffer = output_buffer @output_buffer << render_triplet(instance_eval(&block)) end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/triplet/template.rb', line 13 def to_s @output_buffer.to_s end |