Class: Debride
- Inherits:
-
Object
- Object
- Debride
- Defined in:
- lib/debride_erb.rb
Defined Under Namespace
Instance Method Summary collapse
-
#process_erb(file) ⇒ Object
Process erb and parse the result.
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 |