Class: ActionviewPrecompiler::ControllerParser
- Inherits:
-
Object
- Object
- ActionviewPrecompiler::ControllerParser
- Defined in:
- lib/actionview_precompiler/controller_parser.rb
Instance Method Summary collapse
-
#initialize(filename) ⇒ ControllerParser
constructor
A new instance of ControllerParser.
- #render_calls ⇒ Object
Constructor Details
#initialize(filename) ⇒ ControllerParser
Returns a new instance of ControllerParser.
3 4 5 |
# File 'lib/actionview_precompiler/controller_parser.rb', line 3 def initialize(filename) @filename = filename end |
Instance Method Details
#render_calls ⇒ Object
7 8 9 10 11 |
# File 'lib/actionview_precompiler/controller_parser.rb', line 7 def render_calls src = File.read(@filename) return [] unless src.include?("render") RenderParser.new(src, from_controller: true).render_calls end |