Sha256: ff474a981f3fef194c800384cfc72af035c4417787a1535bf4631f39394d0b53

Contents?: true

Size: 1.07 KB

Versions: 158

Compression:

Stored size: 1.07 KB

Contents

module Guard

  # A group of Guards. There are two reasons why you want to group your guards:
  #
  # - You can start only certain Groups from the command line by passing the `--group` option.
  # - Abort task execution chain on failure within a group.
  #
  # @example Group that aborts on failure
  #
  #   group :frontend, :halt_on_fail => true do
  #     guard 'coffeescript', :input => 'spec/coffeescripts', :output => 'spec/javascripts'
  #     guard 'jasmine-headless-webkit' do
  #       watch(%r{^spec/javascripts/(.*)\..*}) { |m| newest_js_file("spec/javascripts/#{m[1]}_spec") }
  #     end
  #   end
  #
  # @see Guard::CLI
  #
  class Group

    attr_accessor :name, :options

    # Initialize a Group.
    #
    # @param [String] name the name of the group
    # @param [Hash] options the group options
    # @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`
    #
    def initialize(name, options = {})
      @name    = name.to_sym
      @options = options
    end

  end

end

Version data entries

158 entries across 66 versions & 4 rubygems

Version Path
classiccms-0.5.7 vendor/bundle/gems/guard-1.0.1/lib/guard/group.rb
classiccms-0.5.6 vendor/bundle/gems/guard-1.0.2/lib/guard/group.rb
classiccms-0.5.6 vendor/bundle/gems/guard-1.0.1/lib/guard/group.rb
classiccms-0.5.6 vendor/bundle/gems/guard-1.0.3/lib/guard/group.rb
classiccms-0.5.5 vendor/bundle/gems/guard-1.0.1/lib/guard/group.rb
classiccms-0.5.5 vendor/bundle/gems/guard-1.0.3/lib/guard/group.rb
classiccms-0.5.5 vendor/bundle/gems/guard-1.0.2/lib/guard/group.rb
classiccms-0.5.2 vendor/bundle/gems/guard-1.0.2/lib/guard/group.rb
classiccms-0.5.2 vendor/bundle/gems/guard-1.0.3/lib/guard/group.rb
classiccms-0.5.2 vendor/bundle/gems/guard-1.0.1/lib/guard/group.rb
classiccms-0.5.1 vendor/bundle/gems/guard-1.0.2/lib/guard/group.rb
classiccms-0.5.1 vendor/bundle/gems/guard-1.0.1/lib/guard/group.rb
classiccms-0.5.1 vendor/bundle/gems/guard-1.0.3/lib/guard/group.rb
classiccms-0.5.0 vendor/bundle/gems/guard-1.0.1/lib/guard/group.rb
classiccms-0.5.0 vendor/bundle/gems/guard-1.0.2/lib/guard/group.rb
classiccms-0.5.0 vendor/bundle/gems/guard-1.0.3/lib/guard/group.rb
classiccms-0.4.2 vendor/bundle/gems/guard-1.0.1/lib/guard/group.rb
classiccms-0.4.2 vendor/bundle/gems/guard-1.0.2/lib/guard/group.rb
classiccms-0.4.2 vendor/bundle/gems/guard-1.0.3/lib/guard/group.rb
classiccms-0.4.1 vendor/bundle/gems/guard-1.0.2/lib/guard/group.rb