Module: Simple::CLI
- Extended by:
- Logger
- Defined in:
- lib/simple/cli.rb,
lib/simple/cli.rb,
lib/simple/cli/version.rb
Defined Under Namespace
Modules: Adapter, Helpers, Logger Classes: Runner
Constant Summary collapse
- VERSION =
"0.2.21"
Class Method Summary collapse
Instance Method Summary collapse
-
#run!(command, *args) ⇒ Object
Simple::CLI.run! is called from Runner.run.
Methods included from Logger
Class Method Details
.included(base) ⇒ Object
14 15 16 17 |
# File 'lib/simple/cli.rb', line 14 def self.included(base) base.extend(::Simple::CLI::Adapter) base.include(::Simple::CLI::Helpers) end |
Instance Method Details
#run!(command, *args) ⇒ Object
Simple::CLI.run! is called from Runner.run. It is called with a method name, which is derived from the command passed in via the command line, and parsed arguments.
The default implementation just calls the respective method on self. Implementations might override this method to provide some before/after functionality.
26 27 28 |
# File 'lib/simple/cli.rb', line 26 def run!(command, *args) send(command, *args) end |