Class: TheTwittHit::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/thetwitthit/worker.rb

Constant Summary collapse

SCRIPT =
<<EOF
tell application "The Hit List"
	tell inbox to make new task with properties {%s}
end tell
EOF

Instance Method Summary collapse

Constructor Details

#initializeWorker

Returns a new instance of Worker.



10
11
12
# File 'lib/thetwitthit/worker.rb', line 10

def initialize
  @config = TheTwittHit::Config.new
end

Instance Method Details

#configObject



20
21
22
# File 'lib/thetwitthit/worker.rb', line 20

def config
  @config
end

#loadObject



14
15
16
17
18
# File 'lib/thetwitthit/worker.rb', line 14

def load
  twitts = user_timeline_todos + replies_todos + direct_messages_todos
  twitts.each { |twitt| save(twitt) }
  @config.save
end