Class: MediaWiki::MediaWikiBase
- Inherits:
-
Object
- Object
- MediaWiki::MediaWikiBase
- Defined in:
- lib/mediawiki.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#pages ⇒ Object
Returns the value of attribute pages.
-
#xml ⇒ Object
Returns the value of attribute xml.
Instance Method Summary collapse
-
#initialize(url) ⇒ MediaWikiBase
constructor
A new instance of MediaWikiBase.
Constructor Details
#initialize(url) ⇒ MediaWikiBase
Returns a new instance of MediaWikiBase.
101 102 103 104 |
# File 'lib/mediawiki.rb', line 101 def initialize(url) @xml = get_xml(url) @pages = (@xml/:api/:query/:pages/:page).collect{|p| Page.new(p) } end |
Instance Attribute Details
#pages ⇒ Object
Returns the value of attribute pages.
99 100 101 |
# File 'lib/mediawiki.rb', line 99 def pages @pages end |
#xml ⇒ Object
Returns the value of attribute xml.
99 100 101 |
# File 'lib/mediawiki.rb', line 99 def xml @xml end |