class WonderScrape::Command

Public Instance Methods

command(**options) click to toggle source

The external commands runner

@see www.rubydoc.info/gems/tty-command

@api public

# File lib/wonder_scrape/command.rb, line 26
def command(**options)
  require 'tty-command'
  TTY::Command.new(options)
end
execute(*) click to toggle source

Execute this command

@api public

# File lib/wonder_scrape/command.rb, line 14
def execute(*)
  raise(
    NotImplementedError,
    "#{self.class}##{__method__} must be implemented"
  )
end
prompt() click to toggle source

The interactive prompt

@see www.rubydoc.info/gems/tty-prompt

@api public

# File lib/wonder_scrape/command.rb, line 36
def prompt
  require 'tty-prompt'
  TTY::Prompt.new(interrupt: :exit)
end