Class: AgileNotifier::Judger

Inherits:
Object
  • Object
show all
Defined in:
lib/agile_notifier/judger.rb

Class Method Summary collapse

Class Method Details

.on_fail(trackable, text, args) ⇒ Object



7
8
9
# 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) ⇒ Object



19
20
21
# 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) ⇒ Object



23
24
25
26
27
28
# 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) ⇒ Object



15
16
17
# 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) ⇒ Object



11
12
13
# File 'lib/agile_notifier/judger.rb', line 11

def on_unstable(trackable, text, args)
  on_condition(trackable.unstable?, text, args)
end