Class: Railsdock::Command
- Inherits:
-
Object
- Object
- Railsdock::Command
- Extended by:
- Forwardable
- Defined in:
- lib/railsdock/command.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#cmd(**options) ⇒ Object
The external commands runner.
- #color ⇒ Object
-
#execute ⇒ Object
Execute this command.
-
#file ⇒ Object
File manipulation utility methods.
-
#platform ⇒ Object
Terminal platform and OS properties.
-
#prompt(**options) ⇒ Object
The interactive prompt.
Instance Method Details
#cmd(**options) ⇒ Object
The external commands runner
26 27 28 29 |
# File 'lib/railsdock/command.rb', line 26 def cmd(**) require 'tty-command' TTY::Command.new() end |
#color ⇒ Object
61 62 63 64 |
# File 'lib/railsdock/command.rb', line 61 def color require 'pastel' Pastel.new end |
#execute ⇒ Object
Execute this command
14 15 16 17 18 19 |
# File 'lib/railsdock/command.rb', line 14 def execute(*) raise( NotImplementedError, "#{self.class}##{__method__} must be implemented" ) end |
#file ⇒ Object
File manipulation utility methods.
36 37 38 39 |
# File 'lib/railsdock/command.rb', line 36 def file require 'tty-file' TTY::File end |
#platform ⇒ Object
Terminal platform and OS properties
46 47 48 49 |
# File 'lib/railsdock/command.rb', line 46 def platform require 'tty-platform' TTY::Platform.new end |
#prompt(**options) ⇒ Object
The interactive prompt
56 57 58 59 |
# File 'lib/railsdock/command.rb', line 56 def prompt(**) require 'tty-prompt' TTY::Prompt.new() end |