Method: Guard::Dsl#scope

Defined in:
lib/guard/dsl.rb

#scope(scope = {}) ⇒ Object

Sets the default scope on startup

Examples:

Scope Guard to a single group

scope group: :frontend

Scope Guard to multiple groups

scope groups: [:specs, :docs]

Scope Guard to a single plugin

scope plugin: :test

Scope Guard to multiple plugins

scope plugins: [:jasmine, :rspec]

Parameters:

  • scope (Hash) (defaults to: {})

    the scope for the groups and plugins



372
373
374
375
# File 'lib/guard/dsl.rb', line 372

def scope(scope = {})
  # TODO: use a Guardfile::Results class
  Guard.state.session.guardfile_scope(scope)
end