Class: Guard::Dsl::Change

Inherits:
Object
  • Object
show all
Defined in:
lib/guardfile/dsl/change.rb

Instance Method Summary collapse

Constructor Details

#initialize(guardfile, patterns) ⇒ Change

Returns a new instance of Change.



4
5
6
7
# File 'lib/guardfile/dsl/change.rb', line 4

def initialize guardfile, patterns
  @guardfile = guardfile
  @patterns  = patterns
end

Instance Method Details

#run(action) ⇒ Object



9
10
11
# File 'lib/guardfile/dsl/change.rb', line 9

def run action
  @guardfile.run(action).on_change_in(*@patterns)
end