Class: ActionviewPrecompiler::HelperParser

Inherits:
Object
  • Object
show all
Defined in:
lib/actionview_precompiler/helper_parser.rb

Instance Method Summary collapse

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_callsObject



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