Module: RightGit::Shell::Interface
- Included in:
- Default
- Defined in:
- lib/right_git/shell/interface.rb
Overview
Interface for a shell intended to work with RightGit.
Instance Method Summary collapse
-
#default_logger ⇒ Logger
Return a logger object to be used for logging if nothing else is passed in as an option.
-
#execute(cmd, options = {}) ⇒ Integer
Run the given command and print the output to stdout.
-
#output_for(cmd, options = {}) ⇒ Object
Invoke a shell command and return its output as a string, similar to backtick but defaulting to raising exception on failure.
Instance Method Details
#default_logger ⇒ Logger
Return a logger object to be used for logging if nothing else is passed in as an option.
Must be overridden.
36 37 38 |
# File 'lib/right_git/shell/interface.rb', line 36 def default_logger raise NotImplementedError end |
#execute(cmd, options = {}) ⇒ Integer
Run the given command and print the output to stdout.
Must be overridden.
72 73 74 |
# File 'lib/right_git/shell/interface.rb', line 72 def execute(cmd, = {}) raise NotImplementedError end |
#output_for(cmd, options = {}) ⇒ Object
Invoke a shell command and return its output as a string, similar to backtick but defaulting to raising exception on failure.
Must be overridden.
85 86 87 |
# File 'lib/right_git/shell/interface.rb', line 85 def output_for(cmd, = {}) raise NotImplementedError end |