Class: Instant::Processor
- Inherits:
-
Object
- Object
- Instant::Processor
- Defined in:
- lib/instant/processor.rb
Instance Method Summary collapse
-
#initialize ⇒ Processor
constructor
A new instance of Processor.
- #process(source) ⇒ Object
Constructor Details
#initialize ⇒ Processor
Returns a new instance of Processor.
6 7 8 9 |
# File 'lib/instant/processor.rb', line 6 def initialize @parser = RubyParser.new @generator = Ruby2Ruby.new end |
Instance Method Details
#process(source) ⇒ Object
11 12 13 14 15 |
# File 'lib/instant/processor.rb', line 11 def process(source) sexp = @parser.process(source) sexp = process_sexp(sexp) @generator.process(sexp) end |