Class: MediaWikiParams
- Inherits:
-
Object
- Object
- MediaWikiParams
- 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
- #time=(t) ⇒ Object
Constructor Details
#initialize ⇒ MediaWikiParams
Returns a new instance of MediaWikiParams.
12 13 14 |
# File 'lib/mediacloth/mediawikiparams.rb', line 12 def initialize @author = "Creator" end |
Instance Attribute Details
#author ⇒ Object
The name of the wiki page author
10 11 12 |
# File 'lib/mediacloth/mediawikiparams.rb', line 10 def @author end |
Instance Method Details
#time ⇒ Object
16 17 18 |
# File 'lib/mediacloth/mediawikiparams.rb', line 16 def time (@time || Time.now.utc).strftime("%a %b %d, %Y %H:%M") end |
#time=(t) ⇒ Object
20 21 22 |
# File 'lib/mediacloth/mediawikiparams.rb', line 20 def time=(t) @time = t end |