Sha256: 09b94c0d71ada06037582f3597a3c4a9429dac4690aac611291619eb33667103

Contents?: true

Size: 349 Bytes

Versions: 4

Compression:

Stored size: 349 Bytes

Contents

require 'retrobot/tweet_filters/base'

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

      def filter(tweet)
        if config.remove_hashtag
          tweet.text.gsub!(/(|\s)#\w+/, '')
          tweet
        else
          tweet
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
retrobot-0.3.5 lib/retrobot/tweet_filters/remove_hashtag.rb
retrobot-0.3.4 lib/retrobot/tweet_filters/remove_hashtag.rb
retrobot-0.3.3 lib/retrobot/tweet_filters/remove_hashtag.rb
retrobot-0.3.2 lib/retrobot/tweet_filters/remove_hashtag.rb