Sha256: 1ed2f72736b912faeb7b7f7f26cc73dee6102fe006096a6cd3418ee58a483531

Contents?: true

Size: 325 Bytes

Versions: 2

Compression:

Stored size: 325 Bytes

Contents

require 'murlsh'

module Murlsh

  # try to fetch the content type and title of a url
  class AddPre50LookupContentTypeTitle < Plugin

    Hook = 'add_pre'

    def self.run(url, config)
      ask = URI(url.url).extend(Murlsh::UriAsk)
      url.content_type = ask.content_type
      url.title = ask.title
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
murlsh-0.6.1 plugins/add_pre_50_lookup_content_type_title.rb
murlsh-0.6.0 plugins/add_pre_50_lookup_content_type_title.rb