In Files

Parent

Guard::CLI

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.

Public Instance Methods

init(guard_name = nil) click to toggle source

Appends the Guard template to the `Guardfile`, or creates an initial `Guardfile` when no Guard name is passed.

@see Guard.initialize_template

@param [String] guard_name the name of the Guard to initialize

# File lib/guard/cli.rb, line 114
def init(guard_name = nil)
  verify_bundler_presence
  ::Guard.initialize_template(guard_name)
end
list() click to toggle source

List the Guards that are available for use in your system and marks those that are currently used in your `Guardfile`.

@see Guard::DslDescriber.list

# File lib/guard/cli.rb, line 88
def list
  verify_bundler_presence
  ::Guard::DslDescriber.list(options)
end
show() click to toggle source

Shows all Guards and their options that are defined in the `Guardfile`

@see Guard::DslDescriber.show

# File lib/guard/cli.rb, line 127
def show
  verify_bundler_presence
  ::Guard::DslDescriber.show(options)
end
start() click to toggle source

Start Guard by initialize the defined Guards and watch the file system. This is the default task, so calling `guard` is the same as calling `guard start`.

@see Guard.start

# File lib/guard/cli.rb, line 73
def start
  verify_bundler_presence
  ::Guard.start(options)
rescue Interrupt
  ::Guard.stop
  abort
end
version() click to toggle source

Shows the current version of Guard.

@see Guard::VERSION

# File lib/guard/cli.rb, line 100
def version
  verify_bundler_presence
  ::Guard::UI.info "Guard version #{ ::Guard::VERSION }"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.