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