Class: ClWiki::Configuration
- Inherits:
-
Object
- Object
- ClWiki::Configuration
- Defined in:
- lib/cl_wiki/configuration.rb
Overview
noinspection RubyTooManyInstanceVariablesInspection
Instance Attribute Summary collapse
-
#cssHref ⇒ Object
Returns the value of attribute cssHref.
-
#custom_formatter_load_path ⇒ Object
readonly
Returns the value of attribute custom_formatter_load_path.
-
#edit_cols ⇒ Object
Returns the value of attribute edit_cols.
-
#edit_rows ⇒ Object
Returns the value of attribute edit_rows.
-
#editable ⇒ Object
Returns the value of attribute editable.
-
#encryption_default ⇒ Object
Returns the value of attribute encryption_default.
-
#global_edits ⇒ Object
Returns the value of attribute global_edits.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#page_update_format ⇒ Object
Returns the value of attribute page_update_format.
-
#publishTag ⇒ Object
Returns the value of attribute publishTag.
-
#template ⇒ Object
Returns the value of attribute template.
-
#url_prefix ⇒ Object
Returns the value of attribute url_prefix.
-
#use_authentication ⇒ Object
Returns the value of attribute use_authentication.
-
#wiki_path ⇒ Object
Returns the value of attribute wiki_path.
Class Method Summary collapse
Instance Method Summary collapse
- #default_hash ⇒ Object
-
#initialize(hash = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #override_access_log_index ⇒ Object
- #restore_access_log_index ⇒ Object
Constructor Details
#initialize(hash = {}) ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 |
# File 'lib/cl_wiki/configuration.rb', line 15 def initialize(hash = {}) default_hash.merge(hash).each do |k, v| instance_variable_set(:"@#{k}", v) end end |
Instance Attribute Details
#cssHref ⇒ Object
Returns the value of attribute cssHref.
10 11 12 |
# File 'lib/cl_wiki/configuration.rb', line 10 def cssHref @cssHref end |
#custom_formatter_load_path ⇒ Object (readonly)
Returns the value of attribute custom_formatter_load_path.
13 14 15 |
# File 'lib/cl_wiki/configuration.rb', line 13 def custom_formatter_load_path @custom_formatter_load_path end |
#edit_cols ⇒ Object
Returns the value of attribute edit_cols.
13 14 15 |
# File 'lib/cl_wiki/configuration.rb', line 13 def edit_cols @edit_cols end |
#edit_rows ⇒ Object
Returns the value of attribute edit_rows.
13 14 15 |
# File 'lib/cl_wiki/configuration.rb', line 13 def edit_rows @edit_rows end |
#editable ⇒ Object
Returns the value of attribute editable.
13 14 15 |
# File 'lib/cl_wiki/configuration.rb', line 13 def editable @editable end |
#encryption_default ⇒ Object
Returns the value of attribute encryption_default.
10 11 12 |
# File 'lib/cl_wiki/configuration.rb', line 10 def encryption_default @encryption_default end |
#global_edits ⇒ Object
Returns the value of attribute global_edits.
10 11 12 |
# File 'lib/cl_wiki/configuration.rb', line 10 def global_edits @global_edits end |
#owner ⇒ Object
Returns the value of attribute owner.
10 11 12 |
# File 'lib/cl_wiki/configuration.rb', line 10 def owner @owner end |
#page_update_format ⇒ Object
Returns the value of attribute page_update_format.
10 11 12 |
# File 'lib/cl_wiki/configuration.rb', line 10 def page_update_format @page_update_format end |
#publishTag ⇒ Object
Returns the value of attribute publishTag.
10 11 12 |
# File 'lib/cl_wiki/configuration.rb', line 10 def publishTag @publishTag end |
#template ⇒ Object
Returns the value of attribute template.
10 11 12 |
# File 'lib/cl_wiki/configuration.rb', line 10 def template @template end |
#url_prefix ⇒ Object
Returns the value of attribute url_prefix.
10 11 12 |
# File 'lib/cl_wiki/configuration.rb', line 10 def url_prefix @url_prefix end |
#use_authentication ⇒ Object
Returns the value of attribute use_authentication.
10 11 12 |
# File 'lib/cl_wiki/configuration.rb', line 10 def use_authentication @use_authentication end |
#wiki_path ⇒ Object
Returns the value of attribute wiki_path.
10 11 12 |
# File 'lib/cl_wiki/configuration.rb', line 10 def wiki_path @wiki_path end |
Class Method Details
.load(filename = $defaultConfFile) ⇒ Object
58 59 60 |
# File 'lib/cl_wiki/configuration.rb', line 58 def self.load(filename = $defaultConfFile) $wiki_conf = self.new(YAML.safe_load(::File.open(filename))) end |
Instance Method Details
#default_hash ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/cl_wiki/configuration.rb', line 21 def default_hash { url_prefix: '/', publishTag: nil, useIndexForPageExists: false, edit_rows: 25, edit_cols: 80, custom_formatter_load_path: [], use_authentication: false } end |
#override_access_log_index ⇒ Object
41 42 43 44 |
# File 'lib/cl_wiki/configuration.rb', line 41 def override_access_log_index @orig_access_log_index_value = @access_log_index @access_log_index = false end |
#restore_access_log_index ⇒ Object
46 47 48 |
# File 'lib/cl_wiki/configuration.rb', line 46 def restore_access_log_index @access_log_index = @orig_access_log_index_value if @orig_access_log_index_value end |