Module: EacRubyBase0::Runner::Prepend

Defined in:
lib/eac_ruby_base0/runner/prepend.rb

Constant Summary collapse

ERROR_EXIT_CODE =
113
DISABLE_RESCUE_ENVVAR =
'DISABLE_RESCUE'

Instance Method Summary collapse

Instance Method Details

#disable_rescue?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/eac_ruby_base0/runner/prepend.rb', line 10

def disable_rescue?
  ::ENV.fetch(DISABLE_RESCUE_ENVVAR, false).to_bool
end

#runObject



14
15
16
17
18
19
20
21
22
# File 'lib/eac_ruby_base0/runner/prepend.rb', line 14

def run
  on_rescue_errors do
    if parsed.version?
      show_version
    else
      run_with_subcommand
    end
  end
end

#run_runObject



24
25
26
# File 'lib/eac_ruby_base0/runner/prepend.rb', line 24

def run_run
  on_context { super }
end