Class: GCI::CLI
- Inherits:
-
Object
- Object
- GCI::CLI
- Defined in:
- lib/gci/cli.rb
Constant Summary collapse
- COMMANDS =
%i[generate root].freeze
Instance Method Summary collapse
Instance Method Details
#dispatch(command, options) ⇒ Object
7 8 9 10 11 |
# File 'lib/gci/cli.rb', line 7 def dispatch(command, ) raise Error, "Invalid command '#{command}'" unless COMMANDS.include?(command.to_sym) public_send(command, ) end |
#generate(options) ⇒ Object
13 14 15 16 17 |
# File 'lib/gci/cli.rb', line 13 def generate() evaluate_user_config() GCI.pipeline.write end |
#root(options) ⇒ Object
19 20 21 22 23 |
# File 'lib/gci/cli.rb', line 19 def root() evaluate_user_config() GCI.root_pipeline.write end |