Class: Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/mailchekka/checker.rb

Instance Method Summary collapse

Constructor Details

#initialize(mailbox, interval) ⇒ Checker

Returns a new instance of Checker.



2
3
4
5
6
# File 'lib/mailchekka/checker.rb', line 2

def initialize(mailbox, interval)
  @interval = interval
  @mailbox  = mailbox
  @unread   = nil
end

Instance Method Details

#runObject



8
9
10
11
12
13
# File 'lib/mailchekka/checker.rb', line 8

def run
  rotate do
    @mailbox.prepare
    present(@mailbox.getnum)
  end
end