Class: Malline::ErbOut

Inherits:
Object
  • Object
show all
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

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