Sha256: 1d04f9ffb3f53aaa72002fbd55308557bc6e4016eec364a4b17aac3d55a7feef

Contents?: true

Size: 261 Bytes

Versions: 13

Compression:

Stored size: 261 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

13 entries across 13 versions & 1 rubygems

Version Path
wikipedia-client-1.6.3 lib/wikipedia/url.rb
wikipedia-client-1.6.2 lib/wikipedia/url.rb
wikipedia-client-1.6.1 lib/wikipedia/url.rb
wikipedia-client-1.5.0 lib/wikipedia/url.rb
wikipedia-client-1.4.0 lib/wikipedia/url.rb
wikipedia-client-1.3.3 lib/wikipedia/url.rb
wikipedia-client-1.3.2 lib/wikipedia/url.rb
wikipedia-client-1.3.0 lib/wikipedia/url.rb
wikipedia-client-1.2.0 lib/wikipedia/url.rb
wikipedia-client-1.1.2 lib/wikipedia/url.rb
wikipedia-client-1.1.1 lib/wikipedia/url.rb
wikipedia-client-1.1.0 lib/wikipedia/url.rb
wikipedia-client-1.0.0 lib/wikipedia/url.rb