Class: ServletSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/soks-servlet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wiki, view_controller) ⇒ ServletSettings

Returns a new instance of ServletSettings.



17
18
19
20
21
22
23
24
25
# File 'lib/soks-servlet.rb', line 17

def initialize( wiki, view_controller )
	@wiki, @view_controller = wiki, view_controller
	@home_page = 'Home Page'
	@default_view = 'view'
	@authenticators = []
	@static_file_directories = {}
	@content_types = {}
	@force_no_cache = false
end

Instance Attribute Details

#authenticatorsObject

Returns the value of attribute authenticators.



11
12
13
# File 'lib/soks-servlet.rb', line 11

def authenticators
  @authenticators
end

#content_typesObject

Returns the value of attribute content_types.



14
15
16
# File 'lib/soks-servlet.rb', line 14

def content_types
  @content_types
end

#default_viewObject

Returns the value of attribute default_view.



9
10
11
# File 'lib/soks-servlet.rb', line 9

def default_view
  @default_view
end

#force_no_cacheObject

Returns the value of attribute force_no_cache.



13
14
15
# File 'lib/soks-servlet.rb', line 13

def force_no_cache
  @force_no_cache
end

#home_pageObject

Returns the value of attribute home_page.



8
9
10
# File 'lib/soks-servlet.rb', line 8

def home_page
  @home_page
end

#static_file_directoriesObject

Returns the value of attribute static_file_directories.



12
13
14
# File 'lib/soks-servlet.rb', line 12

def static_file_directories
  @static_file_directories
end

#upload_directoryObject

Returns the value of attribute upload_directory.



10
11
12
# File 'lib/soks-servlet.rb', line 10

def upload_directory
  @upload_directory
end

#view_controllerObject

Returns the value of attribute view_controller.



7
8
9
# File 'lib/soks-servlet.rb', line 7

def view_controller
  @view_controller
end

#wikiObject

Returns the value of attribute wiki.



7
8
9
# File 'lib/soks-servlet.rb', line 7

def wiki
  @wiki
end

#wiki_directoryObject

Returns the value of attribute wiki_directory.



15
16
17
# File 'lib/soks-servlet.rb', line 15

def wiki_directory
  @wiki_directory
end

Instance Method Details

#page_name_for_url_name(url_name) ⇒ Object



31
32
33
# File 'lib/soks-servlet.rb', line 31

def page_name_for_url_name( url_name )
	@view_controller.page_name_for_url_name( url_name )
end

#urlObject



27
28
29
# File 'lib/soks-servlet.rb', line 27

def url
	@view_controller.root_url
end

#url_name_for_page_name(page_name) ⇒ Object



35
36
37
# File 'lib/soks-servlet.rb', line 35

def url_name_for_page_name( page_name )
	@view_controller.url_name_for_page_name( page_name )
end