Class: Hotspots::Exit::Safe
- Inherits:
-
Object
- Object
- Hotspots::Exit::Safe
- Defined in:
- lib/hotspots/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) ⇒ Safe
constructor
A new instance of Safe.
- #perform ⇒ Object
Constructor Details
#initialize(options) ⇒ Safe
Returns a new instance of Safe.
20 21 22 23 |
# File 'lib/hotspots/exit.rb', line 20 def initialize() @message = [:message] @code = 0 end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
18 19 20 |
# File 'lib/hotspots/exit.rb', line 18 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
18 19 20 |
# File 'lib/hotspots/exit.rb', line 18 def @message end |
Instance Method Details
#perform ⇒ Object
25 26 27 28 |
# File 'lib/hotspots/exit.rb', line 25 def perform $stdout.puts @message exit @code end |