# frozen_string_literal: true require 'forwardable' module Railsbytes class Command extend Forwardable def_delegators :command, :run # Execute this command # # @api public def execute(*) raise( NotImplementedError, "#{self.class}##{__method__} must be implemented" ) end # The interactive prompt # # @see http://www.rubydoc.info/gems/tty-prompt # # @api public def prompt(**options) require 'tty-prompt' TTY::Prompt.new(**options) end # The external commands runner # # @see http://www.rubydoc.info/gems/tty-command # # @api public def command(**options) require 'tty-command' TTY::Command.new(**options) end end end