Class: Teamocil::CLI
- Inherits:
-
Object
- Object
- Teamocil::CLI
- Defined in:
- lib/teamocil/cli.rb
Constant Summary collapse
- DIRECTORY =
'$HOME/.teamocil'
Instance Method Summary collapse
Instance Method Details
#run! ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/teamocil/cli.rb', line 5 def run! Teamocil.(arguments: arguments) # List available layouts return Teamocil::Layout.print_available_layouts(directory: root) if Teamocil.[:list] # Fetch the Layout object layout = Teamocil::Layout.new(path: layout_file_path) # Open layout file in $EDITOR return layout.edit! if Teamocil.[:edit] # Output the layout raw content return layout.show! if Teamocil.[:show] # Nothing? Let’s execute this layout! layout.execute! end |