Method: WikiLib::PMWiki#initialize

Defined in:
lib/wiki_lib/pm_wiki.rb

#initialize(base_page, username, password) ⇒ PMWiki

Initializes a new PMWiki instance

Parameters:

  • base_page (String)

    The base page of the wiki. Probably it’s address, but could be a subset of the namespace

  • username (String)

    Username used to sign off the edits

  • password (String)

    Password used to make edits



15
16
17
18
19
20
# File 'lib/wiki_lib/pm_wiki.rb', line 15

def initialize(base_page, username, password)
  @base = base_page
  @pass = password
  @user = username
  @agent = ::Mechanize.new
end