Class: Retrobot::TweetFilters::RetroDays

Inherits:
Base
  • Object
show all
Defined in:
lib/retrobot/tweet_filters/retro_days.rb

Instance Method Summary collapse

Methods inherited from Base

#client, #config, #logger

Constructor Details

#initialize(retrobot) ⇒ RetroDays

Returns a new instance of RetroDays.



8
9
10
# File 'lib/retrobot/tweet_filters/retro_days.rb', line 8

def initialize(retrobot)
  super
end

Instance Method Details

#filter(tweet) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/retrobot/tweet_filters/retro_days.rb', line 12

def filter(tweet)
  if tweet.timestamp > config.retro_days.ago
    raise RetryLater
  else
    tweet
  end
end