class Debride

Public Instance Methods

process_erb(file) click to toggle source

Process erb and parse the result. Returns the sexp of the parsed ruby.

# File lib/debride_erb.rb, line 16
def process_erb file
  erb = File.read file

  ruby = Erubi.new(erb).src

  begin
    RubyParser.new.process ruby, file
  rescue => e
    warn ruby if option[:verbose]
    raise e
  end
end