Sha256: 912e9404b339fbfe57bed266c39ae8251f4d18b458aeffaa9aab6f34a05aa6d1

Contents?: true

Size: 286 Bytes

Versions: 1

Compression:

Stored size: 286 Bytes

Contents

module Tagomatic

  class UrlRemover

    def process(tags_hash)
      result = {}
      tags_hash.each do |tag,value|
        next unless value
        result[tag] = value.gsub(/www\.[^\.]+\.[a-z]{2,4}/, '').gsub(/ by [a-zA-Z0-9]+[\w ]/, '')
      end
      result
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tagomatic-0.1.8 lib/tagomatic/url_remover.rb