Module: Guard::Deprecated::Evaluator

Defined in:
lib/guard/deprecated/evaluator.rb

Constant Summary collapse

EVALUATE_GUARDFILE =
<<-EOS.gsub(/^\s*/, "")
  Starting with Guard 2.8.3 'Guard::Evaluator#evaluate_guardfile' is
  deprecated in favor of '#evaluate'.
EOS
REEVALUATE_GUARDFILE =
<<-EOS.gsub(/^\s*/, "")
  Starting with Guard 2.8.3 'Guard::Evaluator#reevaluate_guardfile' is
  deprecated in favor of '#reevaluate'.

  NOTE: this method no longer does anything since it could not be
  implemented reliably.
EOS

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.add_deprecated(klass) ⇒ Object



9
10
11
# File 'lib/guard/deprecated/evaluator.rb', line 9

def self.add_deprecated(klass)
  klass.send(:include, self)
end

Instance Method Details

#evaluate_guardfileObject



26
27
28
29
# File 'lib/guard/deprecated/evaluator.rb', line 26

def evaluate_guardfile
  UI.deprecation(EVALUATE_GUARDFILE)
  evaluate
end

#reevaluate_guardfileObject



31
32
33
34
35
36
# File 'lib/guard/deprecated/evaluator.rb', line 31

def reevaluate_guardfile
  # require guard only when needed, because
  # guard's deprecations require us
  require "guard"
  UI.deprecation(REEVALUATE_GUARDFILE)
end