Class: MediaWikiParams

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

Instance Method Summary collapse

Constructor Details

#initializeMediaWikiParams

Returns a new instance of MediaWikiParams.



15
16
17
# File 'lib/mediacloth/mediawikiparams.rb', line 15

def initialize
    @author = "Creator"
end

Instance Attribute Details

#authorObject

The name of the wiki page author



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

def author
  @author
end

Instance Method Details

#timeObject

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