Class: Railsbytes::Command
- Inherits:
-
Object
- Object
- Railsbytes::Command
- Extended by:
- Forwardable
- Defined in:
- lib/railsbytes/command.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#command(**options) ⇒ Object
The external commands runner.
-
#execute ⇒ Object
Execute this command.
-
#prompt(**options) ⇒ Object
The interactive prompt.
Instance Method Details
#command(**options) ⇒ Object
The external commands runner
36 37 38 39 |
# File 'lib/railsbytes/command.rb', line 36 def command(**) require 'tty-command' TTY::Command.new(**) end |
#execute ⇒ Object
Execute this command
14 15 16 17 18 19 |
# File 'lib/railsbytes/command.rb', line 14 def execute(*) raise( NotImplementedError, "#{self.class}##{__method__} must be implemented" ) end |
#prompt(**options) ⇒ Object
The interactive prompt
26 27 28 29 |
# File 'lib/railsbytes/command.rb', line 26 def prompt(**) require 'tty-prompt' TTY::Prompt.new(**) end |