Need to experiment if this priority is the best one: rendered =>
output_buffer
Methods
- A
-
- L
-
- N
-
- R
-
- V
-
Class Public methods
Source:
show
| on GitHub
def initialize
@rendered_views ||= Hash.new { |hash, key| hash[key] = [] }
end
Instance Public methods
Source:
show
| on GitHub
def add(view, locals)
@rendered_views[view] ||= []
@rendered_views[view] << locals
end
Source:
show
| on GitHub
def locals_for(view)
@rendered_views[view]
end
Source:
show
| on GitHub
def rendered_views
@rendered_views.keys
end
view_rendered?(view, expected_locals)
Link
Source:
show
| on GitHub
def view_rendered?(view, expected_locals)
locals_for(view).any? do |actual_locals|
expected_locals.all? { |key, value| value == actual_locals[key] }
end
end