Class: ShellShock::ExitCommand
- Inherits:
-
Object
- Object
- ShellShock::ExitCommand
- Defined in:
- lib/shell_shock/exit_command.rb
Instance Attribute Summary collapse
-
#help ⇒ Object
readonly
Returns the value of attribute help.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
- #execute(_ignore) ⇒ Object
-
#initialize(context) ⇒ ExitCommand
constructor
A new instance of ExitCommand.
Constructor Details
#initialize(context) ⇒ ExitCommand
Returns a new instance of ExitCommand.
7 8 9 10 11 |
# File 'lib/shell_shock/exit_command.rb', line 7 def initialize(context) @context = context @usage = "" @help = "exits the current context" end |
Instance Attribute Details
#help ⇒ Object (readonly)
Returns the value of attribute help.
5 6 7 |
# File 'lib/shell_shock/exit_command.rb', line 5 def help @help end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
5 6 7 |
# File 'lib/shell_shock/exit_command.rb', line 5 def usage @usage end |
Instance Method Details
#execute(_ignore) ⇒ Object
13 14 15 |
# File 'lib/shell_shock/exit_command.rb', line 13 def execute(_ignore) @context.abort! end |