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.



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

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



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

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

Instance Method Details

#execute(options) ⇒ Object



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

def execute(options)
  parse_options(options)
  setup_builder_default
  prepare_parser

  process_all_input
end