Sha256: 17bd3723ae064c34079dc0b898dbdad1027c4bea133f7acd99c07a3e544ca360

Contents?: true

Size: 251 Bytes

Versions: 5

Compression:

Stored size: 251 Bytes

Contents

module Wikipedia
  class Url
    def initialize(wiki_url)
      @wiki_url = wiki_url
    end

    def title
      return @title if @title

      uri     = URI.parse( @wiki_url )
      @title  = URI.decode( uri.path.split('/').last )
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wikipedia-client-1.9.0 lib/wikipedia/url.rb
wikipedia-client-1.8.0 lib/wikipedia/url.rb
wikipedia-client-1.7.1 lib/wikipedia/url.rb
wikipedia-client-1.7.0 lib/wikipedia/url.rb
wikipedia-client-1.6.4 lib/wikipedia/url.rb