Class: Wikilink::Converter::Sites::Wikipedia
- Inherits:
-
Wikilink::Converter::Site
- Object
- Wikilink::Converter::Site
- Wikilink::Converter::Sites::Wikipedia
- Defined in:
- lib/wikilink/converter/sites/wikipedia.rb
Constant Summary
Constants inherited from Wikilink::Converter::Site
Wikilink::Converter::Site::CURRENT_SITE_NAME, Wikilink::Converter::Site::DEFAULT_NAMESPACE
Instance Attribute Summary
Attributes inherited from Wikilink::Converter::Site
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Wikipedia
constructor
A new instance of Wikipedia.
Methods inherited from Wikilink::Converter::Site
#default_namespace, #namespace, #run
Methods included from ArgumentExtractor
Constructor Details
#initialize(options = {}) ⇒ Wikipedia
Returns a new instance of Wikipedia.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/wikilink/converter/sites/wikipedia.rb', line 7 def initialize( = {}) [:lang] ||= 'en' if [:name] == CURRENT_SITE [:prefix] ||= '/wiki/' else [:prefix] ||= "http://#{[:lang]}.wikipedia.org/wiki/" end super() end |