Class: ActionviewPrecompiler::HelperParser
- Inherits:
-
Object
- Object
- ActionviewPrecompiler::HelperParser
- Defined in:
- lib/actionview_precompiler/helper_parser.rb
Instance Method Summary collapse
-
#initialize(filename) ⇒ HelperParser
constructor
A new instance of HelperParser.
- #render_calls ⇒ Object
Constructor Details
#initialize(filename) ⇒ HelperParser
Returns a new instance of HelperParser.
3 4 5 |
# File 'lib/actionview_precompiler/helper_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/helper_parser.rb', line 7 def render_calls src = File.read(@filename) return [] unless src.include?("render") RenderParser.new(src).render_calls end |