Module: Phlex::Testing::ViewHelper

Defined in:
lib/phlex/testing/view_helper.rb

Instance Method Summary collapse

Instance Method Details

#render(view, &block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/phlex/testing/view_helper.rb', line 5

def render(view, &block)
	if view.is_a?(Class) && view < Phlex::SGML
		view = view.new
	end

	view.call(view_context: view_context, &block)
end

#view_contextObject



13
14
15
# File 'lib/phlex/testing/view_helper.rb', line 13

def view_context
	nil
end