Class: Hotspots::OptionBasedExit::Error
- Inherits:
-
Object
- Object
- Hotspots::OptionBasedExit::Error
- Defined in:
- lib/hotspots/option_based_exit.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(options) ⇒ Error
constructor
A new instance of Error.
- #perform ⇒ Object
Constructor Details
#initialize(options) ⇒ Error
Returns a new instance of Error.
6 7 8 9 |
# File 'lib/hotspots/option_based_exit.rb', line 6 def initialize() @message = [:message] @code = [:code] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/hotspots/option_based_exit.rb', line 4 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/hotspots/option_based_exit.rb', line 4 def @message end |
Instance Method Details
#perform ⇒ Object
11 12 13 14 |
# File 'lib/hotspots/option_based_exit.rb', line 11 def perform puts @message exit @code end |