Class: Wiki2Go::PrivateWikiConfig

Inherits:
Config
  • Object
show all
Defined in:
lib/Wiki2Go/PrivateWikiConfig.rb

Overview

The base class for configurations files of private wikis

Instance Attribute Summary

Attributes inherited from Config

#allow_dynamic_pages, #amazon_affiliate, #blacklist_when_no_checksum, #blog_style, #checksum_required, #checksum_salt, #debug, #default_page, #default_web, #delete_spam, #editor, #generate_html, #group, #maximum_urls, #multi_wiki, #pages_in_recent_changes, #pages_in_rss, #port, #root_directory, #server, #site_admin, #site_directory, #subsite, #user

Instance Method Summary collapse

Methods inherited from Config

#accept_edit?, #accept_page?, #accept_user?, #add_processor, #banned_urls, #banned_users, #blacklist_user, #chonqed_urls, #close, #commit_to_repository, #default_wiki, #enable_dot_graphics, #enable_syntax_highlighting, #errorlog, #greylist, #instant_commit_to_repository, #log, #logfile, #logger, #preprocess, #save, #storage, #update_from_repository, #use_repository

Constructor Details

#initialize(directory) ⇒ PrivateWikiConfig

Initialize with root directory of wiki By default generate HTML


12
13
14
15
# File 'lib/Wiki2Go/PrivateWikiConfig.rb', line 12

def initialize(directory)
  super(directory)
  @generate_html = true
end

Instance Method Details

#editable?(web) ⇒ Boolean

A private wiki is always editable


18
19
20
# File 'lib/Wiki2Go/PrivateWikiConfig.rb', line 18

def editable?(web)
  true
end

#redirect_to_html?(web) ⇒ Boolean

Redirect to the .HTML version after a Save, if site generates HTML


28
29
30
# File 'lib/Wiki2Go/PrivateWikiConfig.rb', line 28

def redirect_to_html?(web)
  @generate_html
end

#redirect_url?(web, url) ⇒ Boolean

Never redirect URLs


23
24
25
# File 'lib/Wiki2Go/PrivateWikiConfig.rb', line 23

def redirect_url?(web,url)
  false
end

#static_web(web) ⇒ Object

The configuration to generate a static HTML page is identical to the current one


33
34
35
# File 'lib/Wiki2Go/PrivateWikiConfig.rb', line 33

def static_web(web) 
  web.clone
end