Class: Rwiki::Configuration
- Inherits:
-
Object
- Object
- Rwiki::Configuration
- Includes:
- Singleton
- Defined in:
- lib/rwiki/configuration.rb
Instance Attribute Summary collapse
-
#page_file_extension ⇒ Object
Returns the value of attribute page_file_extension.
-
#root_page_name ⇒ Object
Returns the value of attribute root_page_name.
-
#rwiki_path ⇒ Object
Returns the value of attribute rwiki_path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #root_page_full_file_path ⇒ Object
- #root_page_full_path ⇒ Object
- #root_page_path ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 |
# File 'lib/rwiki/configuration.rb', line 11 def initialize @rwiki_path = Dir.pwd @root_page_name = 'Home' @page_file_extension = 'txt' end |
Instance Attribute Details
#page_file_extension ⇒ Object
Returns the value of attribute page_file_extension.
9 10 11 |
# File 'lib/rwiki/configuration.rb', line 9 def page_file_extension @page_file_extension end |
#root_page_name ⇒ Object
Returns the value of attribute root_page_name.
8 9 10 |
# File 'lib/rwiki/configuration.rb', line 8 def root_page_name @root_page_name end |
#rwiki_path ⇒ Object
Returns the value of attribute rwiki_path.
7 8 9 |
# File 'lib/rwiki/configuration.rb', line 7 def rwiki_path @rwiki_path end |
Instance Method Details
#root_page_full_file_path ⇒ Object
25 26 27 |
# File 'lib/rwiki/configuration.rb', line 25 def root_page_full_file_path root_page_full_path + '.' + page_file_extension end |
#root_page_full_path ⇒ Object
21 22 23 |
# File 'lib/rwiki/configuration.rb', line 21 def root_page_full_path File.join(rwiki_path, root_page_path) end |
#root_page_path ⇒ Object
17 18 19 |
# File 'lib/rwiki/configuration.rb', line 17 def root_page_path '/' + root_page_name end |