Exception: Ffsr::CommandLineErrorHandler
- Inherits:
-
StandardError
- Object
- StandardError
- Ffsr::CommandLineErrorHandler
- Defined in:
- lib/ffsr/CommandLineErrorHandler.rb
Overview
exception handler for class OptParse and class OptPostprocess
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Instance Method Summary collapse
-
#initialize(message, subject = '') ⇒ CommandLineErrorHandler
constructor
A new instance of CommandLineErrorHandler.
- #printMessage ⇒ Object
Constructor Details
#initialize(message, subject = '') ⇒ CommandLineErrorHandler
Returns a new instance of CommandLineErrorHandler.
6 7 8 9 10 |
# File 'lib/ffsr/CommandLineErrorHandler.rb', line 6 def initialize(, subject = '') = @subject = subject super() end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/ffsr/CommandLineErrorHandler.rb', line 4 def end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
4 5 6 |
# File 'lib/ffsr/CommandLineErrorHandler.rb', line 4 def subject @subject end |
Instance Method Details
#printMessage ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/ffsr/CommandLineErrorHandler.rb', line 12 def printMessage mess = if @subject.length > 0 mess += ': ' + @subject else mess += '.' end puts mess end |