class Checkups::NotificationTimer
Public Class Methods
new(frequency, status)
click to toggle source
# File lib/checkups/notification_timer.rb, line 5 def initialize(frequency, status) @frequency = frequency @status = status end
Public Instance Methods
now?()
click to toggle source
# File lib/checkups/notification_timer.rb, line 10 def now? case @status when :warning, :error true else case @frequency when :always true when /times_a_day/ word = @frequency.to_s.scan(/(.*)_times_a_day/).join IntervalChecker.is_hour_at_day_interval?(word) end end end