Class: MediaWikiParams
- Inherits:
-
Object
- Object
- MediaWikiParams
- Includes:
- Singleton
- Defined in:
- lib/mediacloth/mediawikiparams.rb
Overview
MediaWiki parser parameter handler object.
Stores and gives access to various parser settings and parser environment variables.
Instance Attribute Summary collapse
-
#author ⇒ Object
The name of the wiki page author.
Instance Method Summary collapse
-
#initialize ⇒ MediaWikiParams
constructor
A new instance of MediaWikiParams.
-
#time ⇒ Object
Creation time of the page.
- #time=(t) ⇒ Object
Constructor Details
#initialize ⇒ MediaWikiParams
Returns a new instance of MediaWikiParams.
15 16 17 |
# File 'lib/mediacloth/mediawikiparams.rb', line 15 def initialize @author = "Creator" end |
Instance Attribute Details
#author ⇒ Object
The name of the wiki page author
13 14 15 |
# File 'lib/mediacloth/mediawikiparams.rb', line 13 def @author end |
Instance Method Details
#time ⇒ Object
Creation time of the page. Use overrideTime method to override the value (useful for testing purposes).
21 22 23 24 25 26 27 |
# File 'lib/mediacloth/mediawikiparams.rb', line 21 def time if @time return @time else return Time.now end end |
#time=(t) ⇒ Object
29 30 31 |
# File 'lib/mediacloth/mediawikiparams.rb', line 29 def time=(t) @time = t end |