Improves yardoc (hopefully) [ci skip]
This commit is contained in:
parent
a326c35875
commit
a7a6c5c69e
21
lib/guard.rb
21
lib/guard.rb
@ -43,10 +43,13 @@ module Guard
|
|||||||
|
|
||||||
# Smart accessor for retrieving a specific guard or several guards at once.
|
# Smart accessor for retrieving a specific guard or several guards at once.
|
||||||
#
|
#
|
||||||
# @param [Object] filter an optional filter to retrieve specific guard(s).
|
# @param [String, Symbol] filter return the guard with the given name, or nil if not found.
|
||||||
# @option filter [String, Symbol] return the guard with the given name, or nil if not found
|
# @param [Regexp] filter returns all guards matching the Regexp, or [] if no guard found.
|
||||||
# @option filter [Regexp] returns all guards matching the Regexp, or [] if no guard match
|
# @param [Hash] filter returns all guards matching the given Hash.
|
||||||
# @option filter [NilClass] returns all guards
|
# Example: `{ :name => 'rspec', :group => 'backend' }, or [] if no guard found.
|
||||||
|
# @param [NilClass] filter returns all guards.
|
||||||
|
#
|
||||||
|
# @see Guard.groups
|
||||||
#
|
#
|
||||||
def guards(filter = nil)
|
def guards(filter = nil)
|
||||||
case filter
|
case filter
|
||||||
@ -69,10 +72,11 @@ module Guard
|
|||||||
|
|
||||||
# Smart accessor for retrieving a specific group or several groups at once.
|
# Smart accessor for retrieving a specific group or several groups at once.
|
||||||
#
|
#
|
||||||
# @param [Object] filter an optional filter to retrieve specific group(s).
|
# @param [NilClass] filter returns all groups.
|
||||||
# @option filter [String, Symbol] return the group with the given name, or nil if not found
|
# @param [String, Symbol] filter return the group with the given name, or nil if not found.
|
||||||
# @option filter [Regexp] returns all groups matching the Regexp, or [] if no group match
|
# @param [Regexp] filter returns all groups matching the Regexp, or [] if no group found.
|
||||||
# @option filter [NilClass] returns all groups
|
#
|
||||||
|
# @see Guard.guards
|
||||||
#
|
#
|
||||||
def groups(filter = nil)
|
def groups(filter = nil)
|
||||||
case filter
|
case filter
|
||||||
@ -247,6 +251,7 @@ module Guard
|
|||||||
# @param [Hash] options the group options
|
# @param [Hash] options the group options
|
||||||
# @option options [Boolean] halt_on_fail if a task execution
|
# @option options [Boolean] halt_on_fail if a task execution
|
||||||
# should be halted for all Guards in this group if one Guard throws `:task_has_failed`
|
# should be halted for all Guards in this group if one Guard throws `:task_has_failed`
|
||||||
|
# @return [Guard::Group] the group added (or retrieved from the `@groups` variable if already present)
|
||||||
#
|
#
|
||||||
def add_group(name, options = {})
|
def add_group(name, options = {})
|
||||||
group = groups(name)
|
group = groups(name)
|
||||||
|
@ -11,7 +11,7 @@ module Guard
|
|||||||
# @param [String] name the name of the group
|
# @param [String] name the name of the group
|
||||||
# @param [Hash] options the group options
|
# @param [Hash] options the group options
|
||||||
# @option options [Boolean] halt_on_fail if a task execution
|
# @option options [Boolean] halt_on_fail if a task execution
|
||||||
# should be halted for all Guards in this group if one Guard throws `:task_has_failed`
|
# should be halted for all Guards in this group if one Guard throws `:task_has_failed`
|
||||||
#
|
#
|
||||||
def initialize(name, options = {})
|
def initialize(name, options = {})
|
||||||
@name = name.to_sym
|
@name = name.to_sym
|
||||||
|
Loading…
Reference in New Issue
Block a user