Sha256: dee58729f6bacb944d4962484d329b39d6801efcebe1ce7fbe43c427ce467388

Contents?: true

Size: 301 Bytes

Versions: 2

Compression:

Stored size: 301 Bytes

Contents

module ActionviewPrecompiler
  class ControllerParser
    def initialize(filename)
      @filename = filename
    end

    def render_calls
      src = File.read(@filename)
      return [] unless src.include?("render")
      RenderParser.new(src, from_controller: true).render_calls
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
actionview_precompiler-0.4.0 lib/actionview_precompiler/controller_parser.rb
actionview_precompiler-0.3.0 lib/actionview_precompiler/controller_parser.rb