Class: ConsoleBuddy::Byebug::HelloCommand
- Inherits:
-
Byebug::Command
- Object
- Byebug::Command
- ConsoleBuddy::Byebug::HelloCommand
- Defined in:
- lib/console_buddy/byebug/hello_command.rb
Overview
A demo “hey_buddy” command for Byebug.
Class Method Summary collapse
-
.description ⇒ Object
Short description shown in the ‘help’ output.
-
.regexp ⇒ Object
Return a regex to match the “hey_buddy” command input.
Instance Method Summary collapse
-
#execute ⇒ Object
Called when the user types ‘hey_buddy` in Byebug.
Class Method Details
.description ⇒ Object
Short description shown in the ‘help’ output.
20 21 22 23 24 |
# File 'lib/console_buddy/byebug/hello_command.rb', line 20 def self.description <<-EOD hello: Prints "Hi, I'm buddy!" EOD end |
.regexp ⇒ Object
Return a regex to match the “hey_buddy” command input.
13 14 15 |
# File 'lib/console_buddy/byebug/hello_command.rb', line 13 def self.regexp /^\s*hey_buddy\s*$/ end |
Instance Method Details
#execute ⇒ Object
Called when the user types ‘hey_buddy` in Byebug.
29 30 31 |
# File 'lib/console_buddy/byebug/hello_command.rb', line 29 def execute puts "Hi, I'm buddy!" end |