Class: Shortlook::Command

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/shortlook/command.rb

Direct Known Subclasses

Shortlook::Commands::Provider

Instance Method Summary collapse

Instance Method Details

#executeObject

Execute this command

Raises:

  • (NotImplementedError)


14
15
16
17
18
19
# File 'lib/shortlook/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/shortlook/command.rb', line 26

def prompt(**options)
  require 'tty-prompt'
  TTY::Prompt.new(options)
end