class AgileNotifier::Judger

Public Class Methods

on_fail(trackable, text, args) click to toggle source
# File lib/agile_notifier/judger.rb, line 7
def on_fail(trackable, text, args)
  on_condition(trackable.failed?, text, args)
end
on_fix(trackable, text, args) click to toggle source
# File lib/agile_notifier/judger.rb, line 19
def on_fix(trackable, text, args)
  on_condition(trackable.fixed?, text, args)
end
on_limit(its, args) click to toggle source
# File lib/agile_notifier/judger.rb, line 23
def on_limit(its, args)
  its.exceeds_limit?.each do |key, value|
    on_condition(value, "#{key} #{Composer.warn_wip_limit(args)}", args)
    sleep 1.5 if value
  end
end
on_pass(trackable, text, args) click to toggle source
# File lib/agile_notifier/judger.rb, line 15
def on_pass(trackable, text, args)
  on_condition(trackable.passed?, text, args)
end
on_unstable(trackable, text, args) click to toggle source
# File lib/agile_notifier/judger.rb, line 11
def on_unstable(trackable, text, args)
  on_condition(trackable.unstable?, text, args)
end

Private Class Methods

on_condition(condition, text, args) click to toggle source
# File lib/agile_notifier/judger.rb, line 30
def on_condition(condition, text, args)
  if condition
    TTS.speak(text, args)
    puts '=' * 70
    puts text
    puts '=' * 70
    true
  else
    false
  end
end