Class: ActionView::RenderParser
- Inherits:
-
Object
- Object
- ActionView::RenderParser
- Defined in:
- lib/action_view/render_parser.rb,
lib/action_view/ripper_ast_parser.rb
Overview
:nodoc:
Defined Under Namespace
Modules: RipperASTParser
Instance Method Summary collapse
-
#initialize(name, code) ⇒ RenderParser
constructor
A new instance of RenderParser.
- #render_calls ⇒ Object
Constructor Details
#initialize(name, code) ⇒ RenderParser
Returns a new instance of RenderParser.
7 8 9 10 11 |
# File 'lib/action_view/render_parser.rb', line 7 def initialize(name, code) @name = name @code = code @parser = RipperASTParser end |
Instance Method Details
#render_calls ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/action_view/render_parser.rb', line 13 def render_calls render_nodes = @parser.parse_render_nodes(@code) render_nodes.map do |method, nodes| nodes.map { |n| send(:parse_render, n) } end.flatten.compact end |