Class: WikiAvro::MediaWiki::Comment

Inherits:
XML::Leaf show all
Defined in:
lib/wikiavro/mediawiki.rb

Instance Attribute Summary

Attributes inherited from XML::Element

#attr

Instance Method Summary collapse

Methods inherited from XML::Leaf

#initialize

Methods inherited from XML::Element

#optional?, #parse

Constructor Details

This class inherits a constructor from WikiAvro::XML::Leaf

Instance Method Details

#nameObject



410
411
412
# File 'lib/wikiavro/mediawiki.rb', line 410

def name
  'comment'
end

#parse_attributes(w, p, r) ⇒ Object



414
415
416
417
418
419
# File 'lib/wikiavro/mediawiki.rb', line 414

def parse_attributes(w, p, r)
  deleted = r['deleted']
  comment = r.read_string
  p.comment = {:deleted => deleted,
               :comment => comment}
end