class MailHandler::Receiving::Notification::Console

notification in form of console output

Public Instance Methods

notify(search) click to toggle source
# File lib/mailhandler/receiving/notification/console.rb, line 8
def notify(search)
  output_delay Time.now - search.started_at
end

Private Instance Methods

output(delay) click to toggle source

print to screen delay length

# File lib/mailhandler/receiving/notification/console.rb, line 25
def output(delay)
  puts "  email delay: #{format('%03d', delay)} seconds"
end
output_delay(delay) click to toggle source

print to screen delay length

# File lib/mailhandler/receiving/notification/console.rb, line 19
def output_delay(delay)
  delay_seconds = delay.to_i
  output(delay_seconds) if [0, 1].include?(delay_seconds % Seconds::TO_SHOW)
end