Class: Duty::CLI
- Inherits:
-
Object
- Object
- Duty::CLI
- Defined in:
- lib/duty/cli.rb
Defined Under Namespace
Classes: Input, Output, VerboseView, View
Constant Summary collapse
- DUTY_CONFIG_FILENAME =
'.duty.yml'
Instance Attribute Summary collapse
-
#registry ⇒ Object
readonly
Returns the value of attribute registry.
Instance Method Summary collapse
- #exec ⇒ Object
-
#initialize(args) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(args) ⇒ CLI
10 11 12 13 14 |
# File 'lib/duty/cli.rb', line 10 def initialize(args) @input = Input.new(args) @output = Output.new @registry = Duty::Registry.load(plugins) end |
Instance Attribute Details
#registry ⇒ Object (readonly)
Returns the value of attribute registry.
8 9 10 |
# File 'lib/duty/cli.rb', line 8 def registry @registry end |
Instance Method Details
#exec ⇒ Object
16 17 18 19 20 |
# File 'lib/duty/cli.rb', line 16 def exec stdout usage if help? stdout completion if completion? run_task end |