Class: Guard::CLI
- Inherits:
-
Thor
- Object
- Thor
- Guard::CLI
- Defined in:
- lib/guard/cli.rb
Overview
Facade for the Guard command line interface managed by [Thor](github.com/wycats/thor). This is the main interface to Guard that is called by the Guard binary ‘bin/guard`. Do not put any logic in here, create a class and delegate instead.
Instance Method Summary collapse
-
#init(guard_name = nil) ⇒ Object
Appends the Guard template to the ‘Guardfile`, or creates an initial `Guardfile` when no Guard name is passed.
-
#list ⇒ Object
List the Guards that are available for use in your system and marks those that are currently used in your ‘Guardfile`.
-
#show ⇒ Object
Shows all Guards and their options that are defined in the ‘Guardfile`.
-
#start ⇒ Object
Start Guard by initialize the defined Guards and watch the file system.
-
#version ⇒ Object
Shows the current version of Guard.
Instance Method Details
#init(guard_name = nil) ⇒ Object
Appends the Guard template to the ‘Guardfile`, or creates an initial `Guardfile` when no Guard name is passed.
108 109 110 |
# File 'lib/guard/cli.rb', line 108 def init(guard_name = nil) ::Guard.initialize_template(guard_name) end |
#list ⇒ Object
List the Guards that are available for use in your system and marks those that are currently used in your ‘Guardfile`.
84 85 86 |
# File 'lib/guard/cli.rb', line 84 def list ::Guard::DslDescriber.list() end |
#show ⇒ Object
Shows all Guards and their options that are defined in the ‘Guardfile`.
120 121 122 |
# File 'lib/guard/cli.rb', line 120 def show ::Guard::DslDescriber.show() end |