Class: OptionParser

Inherits:
Object show all
Defined in:
lib/origen/core_ext/option_parser/optparse.rb

Instance Method Summary collapse

Instance Method Details

#orig_parse!Object



3
# File 'lib/origen/core_ext/option_parser/optparse.rb', line 3

alias_method :orig_parse!, :parse!

#parse!(*args) ⇒ Object

Extend this method to save all original options so that they can be later appended to any LSF submissions



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/origen/core_ext/option_parser/optparse.rb', line 6

def parse!(*args)
  lsf_options = ARGV.dup
  orig_parse!(*args)
  lsf_options -= ARGV # Now contains all original options

  # Pick whether we should be using the application's LSF instance or Origen's
  # global LSF instance
  if Origen.running_globally?
    Origen.lsf_manager.command_options = lsf_options
  else
    Origen.app.lsf_manager.command_options = lsf_options
  end
end