Class: Instant::Processor

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

Instance Method Summary collapse

Constructor Details

#initializeProcessor

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