Class: Malline::ErbOut
- Inherits:
-
Object
- Object
- Malline::ErbOut
- Defined in:
- lib/malline/erb_out.rb
Overview
Since some parts of Rails use ERB directly instead of current template handler, we have to capture all that data.
In practice the erb buffer object (named ActiveView::Base.erb_variable) is a string, where data is simply concatted.
Instance Method Summary collapse
-
#concat(value) ⇒ Object
(also: #<<)
Redirect all data to view.
-
#initialize(view) ⇒ ErbOut
constructor
A new instance of ErbOut.
Constructor Details
#initialize(view) ⇒ ErbOut
Returns a new instance of ErbOut.
25 26 27 |
# File 'lib/malline/erb_out.rb', line 25 def initialize view @view = view end |
Instance Method Details
#concat(value) ⇒ Object Also known as: <<
Redirect all data to view
29 30 31 |
# File 'lib/malline/erb_out.rb', line 29 def concat value @view << value end |