Sha256: 9aee5c7f998ae72d700128986aac663ca67b79f845d733613a74cdab6906e4c7

Contents?: true

Size: 245 Bytes

Versions: 3

Compression:

Stored size: 245 Bytes

Contents

module Lita
  module Utils
    class AliasStripper
      def self.strip(robot, message)
        body = message.body.sub(/#{Aliases.values(robot).join('|')}/i, '').strip
        Message.new(robot, body, message.source)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lita-wit-0.1.2 lib/lita/utils/alias_stripper.rb
lita-wit-0.1.1 lib/lita/utils/alias_stripper.rb
lita-wit-0.1.0 lib/lita/utils/alias_stripper.rb