Module: Pry::SendTweet::TwitterAction::DeleteTweetActions
- Included in:
- Pry::SendTweet::TwitterAction
- Defined in:
- lib/pry/send_tweet/commands/twitter_action/delete_tweet_actions.rb
Instance Method Summary collapse
Instance Method Details
#delete_retweet(retweets) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/pry/send_tweet/commands/twitter_action/delete_tweet_actions.rb', line 2 def delete_retweet(retweets) tweets = twitter.unretweet(retweets) if tweets.size == 0 page_error "Are you sure you gave a valid reference to one or more retweets?" else render_tweets tweets, title: bold("Deleted retweets"), timeout: false end rescue Twitter::Error => e page_error(e) end |
#delete_tweet(tweets) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/pry/send_tweet/commands/twitter_action/delete_tweet_actions.rb', line 13 def delete_tweet(tweets) tweets = twitter.destroy_status(tweets) render_tweets tweets, title: bold("Deleted tweets"), timeout: false rescue Twitter::Error => e page_error(e) end |