Class: Atig::Agent::Noretweets

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/atig/agent/noretweets.rb

Instance Method Summary collapse

Methods included from ExceptionUtil

daemon, safe

Constructor Details

#initialize(context, api, db) ⇒ Noretweets

Returns a new instance of Noretweets.



10
11
12
13
14
15
16
17
# File 'lib/atig/agent/noretweets.rb', line 10

def initialize(context, api, db)
  @opts = context.opts
  @log  = context.log
  @db   = db
  log :info, "initialize"

  api.repeat(3600){|t| update t }
end

Instance Method Details

#update(api) ⇒ Object



19
20
21
# File 'lib/atig/agent/noretweets.rb', line 19

def update(api)
  @db.noretweets.clear.concat( api.get("friendships/no_retweets/ids") )
end