Class: WikiAvro::MediaWiki::Contributor
- Inherits:
-
XML::Element
- Object
- XML::Element
- WikiAvro::MediaWiki::Contributor
- Defined in:
- lib/wikiavro/mediawiki.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#username ⇒ Object
Returns the value of attribute username.
Attributes inherited from XML::Element
Instance Method Summary collapse
- #handle_content(w, p, r) ⇒ Object
-
#initialize ⇒ Contributor
constructor
A new instance of Contributor.
- #name ⇒ Object
- #parse_attributes(w, p, r) ⇒ Object
- #reset ⇒ Object
Methods inherited from XML::Element
Constructor Details
#initialize ⇒ Contributor
Returns a new instance of Contributor.
394 395 396 |
# File 'lib/wikiavro/mediawiki.rb', line 394 def initialize super([ContributorGroup.new]) end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
374 375 376 |
# File 'lib/wikiavro/mediawiki.rb', line 374 def id @id end |
#ip ⇒ Object
Returns the value of attribute ip.
376 377 378 |
# File 'lib/wikiavro/mediawiki.rb', line 376 def ip @ip end |
#username ⇒ Object
Returns the value of attribute username.
375 376 377 |
# File 'lib/wikiavro/mediawiki.rb', line 375 def username @username end |
Instance Method Details
#handle_content(w, p, r) ⇒ Object
389 390 391 392 |
# File 'lib/wikiavro/mediawiki.rb', line 389 def handle_content(w, p, r) p.contributor = {:deleted => @deleted, :id => id, :username => username, :ip => ip} end |
#name ⇒ Object
370 371 372 |
# File 'lib/wikiavro/mediawiki.rb', line 370 def name 'contributor' end |
#parse_attributes(w, p, r) ⇒ Object
385 386 387 |
# File 'lib/wikiavro/mediawiki.rb', line 385 def parse_attributes(w, p, r) @deleted = r['deleted'] end |
#reset ⇒ Object
378 379 380 381 382 383 |
# File 'lib/wikiavro/mediawiki.rb', line 378 def reset @id = nil @username = nil @ip = nil @deleted = nil end |