Class: Atig::Agent::Noretweets
- Inherits:
-
Object
- Object
- Atig::Agent::Noretweets
- Includes:
- Util
- Defined in:
- lib/atig/agent/noretweets.rb
Instance Method Summary collapse
-
#initialize(context, api, db) ⇒ Noretweets
constructor
A new instance of Noretweets.
- #update(api) ⇒ Object
Methods included from ExceptionUtil
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 |