Module: Infoboxer::Tree::Linkable
Overview
Instance Method Summary collapse
-
#follow ⇒ MediaWiki::Page
Extracts wiki page by this link and returns it parsed (or nil, if page not found).
-
#url ⇒ String
Human-readable page URL.
Instance Method Details
#follow ⇒ MediaWiki::Page
Extracts wiki page by this link and returns it parsed (or nil, if page not found).
About template "following" see also Template#follow docs.
See also:
- Nodes#follow for extracting multiple links at once;
- MediaWiki#get for basic information on page extraction.
17 18 19 |
# File 'lib/infoboxer/tree/linkable.rb', line 17 def follow client.get(link) end |
#url ⇒ String
Human-readable page URL
24 25 26 27 |
# File 'lib/infoboxer/tree/linkable.rb', line 24 def url # FIXME: fragile as hell. page.url.sub(/[^\/]+$/, link.gsub(' ', '_')) end |