Class: MediaWikiParams

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeMediaWikiParams

Returns a new instance of MediaWikiParams.



12
13
14
# File 'lib/mediacloth/mediawikiparams.rb', line 12

def initialize
    @author = "Creator"
end

Instance Attribute Details

#authorObject

The name of the wiki page author



10
11
12
# File 'lib/mediacloth/mediawikiparams.rb', line 10

def author
  @author
end

Instance Method Details

#timeObject



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