Class: Spinach::Cli
- Inherits:
-
Object
- Object
- Spinach::Cli
- Defined in:
- lib/spinach/cli.rb
Overview
The cli is a class responsible of handling all the command line interface logic.
Instance Method Summary collapse
-
#init_reporter ⇒ Object
Inits the reporter with a default one.
-
#initialize(args = ARGV) ⇒ Cli
constructor
A new instance of Cli.
-
#options ⇒ Hash
A hash of options separated by its type.
-
#run ⇒ true, false
Runs all the features.
Constructor Details
#initialize(args = ARGV) ⇒ Cli
Returns a new instance of Cli.
12 13 14 |
# File 'lib/spinach/cli.rb', line 12 def initialize(args = ARGV) @args = args end |
Instance Method Details
#init_reporter ⇒ Object
Inits the reporter with a default one.
35 36 37 38 39 40 |
# File 'lib/spinach/cli.rb', line 35 def init_reporter reporter = Spinach::Reporter::Stdout.new([:reporter]) Spinach.config.default_reporter = reporter reporter.bind end |
#options ⇒ Hash
Returns A hash of options separated by its type.
50 51 52 |
# File 'lib/spinach/cli.rb', line 50 def @options ||= end |