Sha256: 72d1c0558dd50d707706feea2b2a80ab4ecf6f951aa4c93184e024bd0055538b

Contents?: true

Size: 468 Bytes

Versions: 5

Compression:

Stored size: 468 Bytes

Contents

require 'wikilink/converter/site'

module Wikilink
  class Converter
    module Sites
      class Wikipedia < Wikilink::Converter::Site
        def initialize(options = {})
          options[:lang] ||= 'en'
          if options[:name] == CURRENT_SITE
            options[:prefix] ||= '/wiki/'
          else
            options[:prefix] ||= "http://#{options[:lang]}.wikipedia.org/wiki/"
          end

          super(options)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wikilink-converter-0.2.4 lib/wikilink/converter/sites/wikipedia.rb
wikilink-converter-0.2.3 lib/wikilink/converter/sites/wikipedia.rb
wikilink-converter-0.2.2 lib/wikilink/converter/sites/wikipedia.rb
wikilink-converter-0.2.1 lib/wikilink/converter/sites/wikipedia.rb
wikilink-converter-0.1.0 lib/wikilink/converter/sites/wikipedia.rb