class Guard::Depend

Constants

DEFAULTS

Attributes

detect[R]
options[R]
runner[R]

Public Class Methods

new(options = {}) click to toggle source
Calls superclass method
# File lib/guard/depend.rb, line 17
def initialize(options = {})
  super
  @options = DEFAULTS.merge(options)
  @runner = Runner.new
  @detect = Detect.new(@options[:output_paths])
end

Public Instance Methods

reload() click to toggle source
# File lib/guard/depend.rb, line 32
def reload
end
run_all() click to toggle source
# File lib/guard/depend.rb, line 35
def run_all
  @runner.run(@options[:cmd])
end
run_on_changes(paths = []) click to toggle source
# File lib/guard/depend.rb, line 39
def run_on_changes(paths = [])
  run_if_outdated(paths)
end
start() click to toggle source
# File lib/guard/depend.rb, line 24
def start
  UI.info "#{self.class} is running"
  run_all if @options[:run_on_start]
end
stop() click to toggle source
# File lib/guard/depend.rb, line 29
def stop
end

Private Instance Methods

run_if_outdated(paths = []) click to toggle source
# File lib/guard/depend.rb, line 44
def run_if_outdated(paths = [])
  @runner.run(@options[:cmd]) if detect.out_of_date?(paths)
end