Class: Sutty::Cli::CLI
- Inherits:
-
Thor
- Object
- Thor
- Sutty::Cli::CLI
- Defined in:
- lib/sutty/cli/cli.rb
Overview
Handle the application command line parsing and the dispatch to various command objects
Constant Summary collapse
- Error =
Error raised by this runner
Class.new(StandardError)
Instance Method Summary collapse
- #container(name) ⇒ Object
- #field(name) ⇒ Object
- #layout(name) ⇒ Object
- #post ⇒ Object
- #theme(name) ⇒ Object
- #version ⇒ Object
Instance Method Details
#container(name) ⇒ Object
73 74 75 76 77 78 79 80 |
# File 'lib/sutty/cli/cli.rb', line 73 def container(name) if [:help] invoke :help, ['container'] else require_relative 'commands/container' Sutty::Cli::Commands::Container.new(name, ).execute end end |
#field(name) ⇒ Object
137 138 139 140 141 142 143 |
# File 'lib/sutty/cli/cli.rb', line 137 def field(name) if [:help] invoke :help, ['field'] else Sutty::Cli::Commands::Field.new(name, ).execute end end |
#layout(name) ⇒ Object
148 149 150 151 152 153 154 |
# File 'lib/sutty/cli/cli.rb', line 148 def layout(name) if [:help] invoke :help, ['layout'] else Sutty::Cli::Commands::Layout.new(name, ).execute end end |
#post ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'lib/sutty/cli/cli.rb', line 61 def post if [:help] invoke :help, ['post'] else require_relative 'commands/post' Sutty::Cli::Commands::Post.new().execute end end |