Class: Guard::Group
- Inherits:
-
Object
- Object
- Guard::Group
- Defined in:
- lib/guard/group.rb
Overview
A group of Guard plugins. There are two reasons why you want to group your Guard plugins:
-
You can start only certain groups from the command line by passing the ‘–group` option to `guard start`.
-
Abort task execution chain on failure within a group with the ‘:halt_on_fail` option.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Group
constructor
Initializes a Group.
-
#title ⇒ String
Returns the group title.
-
#to_s ⇒ String
String representation of the group.
Constructor Details
#initialize(name, options = {}) ⇒ Group
Initializes a Group.
35 36 37 38 |
# File 'lib/guard/group.rb', line 35 def initialize(name, = {}) @name = name.to_sym @options = end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/guard/group.rb', line 25 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
25 26 27 |
# File 'lib/guard/group.rb', line 25 def @options end |
Instance Method Details
#title ⇒ String
Returns the group title.
48 49 50 |
# File 'lib/guard/group.rb', line 48 def title @title ||= name.to_s.capitalize end |
#to_s ⇒ String
String representation of the group.
60 61 62 |
# File 'lib/guard/group.rb', line 60 def to_s "#<#{self.class} @name=#{name} @options=#{}>" end |