Class: Debride

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

Defined Under Namespace

Modules: Erb Classes: Erubi

Instance Method Summary collapse

Instance Method Details

#process_erb(file) ⇒ Object

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



16
17
18
19
20
21
22
23
24
25
26
27
# 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