Class: Parser::Runner

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

Direct Known Subclasses

RubyParse, RubyRewrite

Defined Under Namespace

Classes: RubyParse, RubyRewrite

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRunner

Returns a new instance of Runner.



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/parser/runner.rb', line 16

def initialize
  @option_parser = OptionParser.new { |opts| setup_option_parsing(opts) }
  @legacy = {}
  @parser_class  = nil
  @parser        = nil
  @files         = []
  @fragments     = []
  @warnings      = false
  @benchmark     = false

  @source_count = 0
  @source_size  = 0
end

Class Method Details

.go(options) ⇒ Object



12
13
14
# File 'lib/parser/runner.rb', line 12

def self.go(options)
  new.execute(options)
end

Instance Method Details

#execute(options) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/parser/runner.rb', line 30

def execute(options)
  parse_options(options)
  setup_builder_default
  prepare_parser

  process_all_input
end