module Guard::Deprecated::Watcher::ClassMethods

Constants

MATCH_GUARDFILE

Public Instance Methods

match_guardfile?(files) click to toggle source
# File lib/guard/deprecated/watcher.rb, line 16
def match_guardfile?(files)
  require "guard/guardfile/evaluator"
  UI.deprecation(MATCH_GUARDFILE)
  options = ::Guard.state.session.evaluator_options
  evaluator = ::Guard::Guardfile::Evaluator.new(options)
  path = evaluator.guardfile_path
  files.any? { |file| File.expand_path(file) == path }
end