Class: Tools::CLI
- Inherits:
-
Object
- Object
- Tools::CLI
- Defined in:
- lib/tools/cli.rb
Constant Summary collapse
- AVAILABLE_COMMANDS =
%i(create transcode)
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#execute ⇒ Object
Perform actions based on command & options.
-
#initialize(args) ⇒ CLI
constructor
CLI will parse all command line options.
Constructor Details
#initialize(args) ⇒ CLI
CLI will parse all command line options
12 13 14 15 16 17 18 |
# File 'lib/tools/cli.rb', line 12 def initialize(args) @args = args @options = OpenStruct.new parse validate end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/tools/cli.rb', line 8 def @options end |
Instance Method Details
#execute ⇒ Object
Perform actions based on command & options
21 22 23 |
# File 'lib/tools/cli.rb', line 21 def execute Tools.public_send(command, .configuration_path) end |