Class: Rwiki::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/rwiki/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_extensionObject

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_nameObject

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_pathObject

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_pathObject



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_pathObject



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_pathObject



17
18
19
# File 'lib/rwiki/configuration.rb', line 17

def root_page_path
  '/' + root_page_name
end

#versionObject



29
30
31
# File 'lib/rwiki/configuration.rb', line 29

def version
  Rwiki::Version::STRING
end