Class: MediaWiki::MediaWikiBase::Revision

Inherits:
Object
  • Object
show all
Defined in:
lib/mediawiki.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rev) ⇒ Revision

Returns a new instance of Revision.



128
129
130
131
132
133
134
# File 'lib/mediawiki.rb', line 128

def initialize(rev)
  @revid = rev.attributes['revid']
  @user = rev.attributes['user']
  @timestamp = Time.parse(rev.attributes['timestamp'])
  @comment = rev.attributes['comment']
  @content = rev.inner_html
end

Instance Attribute Details

#revidObject

Returns the value of attribute revid.



126
127
128
# File 'lib/mediawiki.rb', line 126

def revid
  @revid
end