Exception: HelpParser::HelpParserException

Inherits:
Exception
  • Object
show all
Defined in:
lib/help_parser/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ HelpParserException

Must give message



8
9
10
11
# File 'lib/help_parser/exceptions.rb', line 8

def initialize(message)
  _init
  super
end

Instance Method Details

#_initObject



3
4
5
# File 'lib/help_parser/exceptions.rb', line 3

def _init
  @code = 1
end

#exitObject



13
14
15
16
17
18
19
20
# File 'lib/help_parser/exceptions.rb', line 13

def exit
  if @code.positive?
    REDTTY[message]
  else
    $stdout.puts message
  end
  Kernel.exit @code
end