Class: Retrobot::TweetFilters::AddInReplyToUrl

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

Constant Summary collapse

TWITTER_BASE_URL =
'https://twitter.com'

Instance Method Summary collapse

Methods inherited from Base

#client, #config, #logger

Constructor Details

#initialize(retrobot) ⇒ AddInReplyToUrl



11
12
13
# File 'lib/retrobot/tweet_filters/add_in_reply_to_url.rb', line 11

def initialize(retrobot)
  super
end

Instance Method Details

#filter(tweet) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/retrobot/tweet_filters/add_in_reply_to_url.rb', line 15

def filter(tweet)
  if tweet.in_reply_to_status_id
    tweet.text = replace_text(tweet.text, tweet.in_reply_to_status_id)
    tweet
  else
    tweet
  end
end