Sha256: 676f55e340969355d6408db451ec88740df8ed8f266c05d84ec59a0a5519fb47

Contents?: true

Size: 487 Bytes

Versions: 3

Compression:

Stored size: 487 Bytes

Contents

require 'retrobot/tweet_filters/base'
require 'retryable'

class Retrobot
  module TweetFilters
    class Tweet < Base
      def initialize(retrobot)
        super
      end

      def filter(tweet)
        tweet tweet.text
      end

      private
      def tweet(text)
        logger.info "tweet: #{text}"
        return if config.dryrun
        retryable(tries: config.retry_count, sleep: config.retry_interval) do
          client.update text
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
retrobot-0.3.2 lib/retrobot/tweet_filters/tweet.rb
retrobot-0.3.1 lib/retrobot/tweet_filters/tweet.rb
retrobot-0.3.0 lib/retrobot/tweet_filters/tweet.rb