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.
| 19 20 21 | # File 'lib/infoboxer/tree/linkable.rb', line 19 def follow client.get(link, interwiki: interwiki) end | 
#url ⇒ String
Human-readable page URL
| 26 27 28 29 | # File 'lib/infoboxer/tree/linkable.rb', line 26 def url # FIXME: fragile as hell. page.url.sub(%r{[^/]+$}, link.tr(' ', '_')) end |