lib/infoboxer/tree/linkable.rb in infoboxer-0.3.0 vs lib/infoboxer/tree/linkable.rb in infoboxer-0.3.1.pre
- old
+ new
@@ -13,11 +13,11 @@
#
# **See also**:
# * {Tree::Nodes#follow} for extracting multiple links at once;
# * {MediaWiki#get} for basic information on page extraction.
def follow
- client.get(link)
+ client.get(link, interwiki: interwiki)
end
# Human-readable page URL
#
# @return [String]
@@ -25,9 +25,12 @@
# FIXME: fragile as hell.
page.url.sub(%r{[^/]+$}, link.tr(' ', '_'))
end
protected
+
+ # redefined in {Wikilink}
+ def interwiki; end
def page
lookup_parents(MediaWiki::Page).first or fail('Not in a page from real source')
end