Sha256: c91bb1e221912df2e2ad15590665324c0fe29fc3d149a9f3b78ab8201ebc424b

Contents?: true

Size: 255 Bytes

Versions: 4

Compression:

Stored size: 255 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.sub(/\/wiki\//, '') )
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wikipedia-client-1.12.0 lib/wikipedia/url.rb
wikipedia-client-1.11.0 lib/wikipedia/url.rb
wikipedia-client-1.10.0 lib/wikipedia/url.rb
wikipedia-client-1.9.1 lib/wikipedia/url.rb