Sha256: be78f33012a4b318aaa8acd60bf5fb1d3347e89e42ce3bc0949dd0d7a6143b37

Contents?: true

Size: 605 Bytes

Versions: 1

Compression:

Stored size: 605 Bytes

Contents

require 'singleton'

module Rwiki
  class Configuration
    include Singleton

    attr_accessor :rwiki_path
    attr_accessor :root_page_name
    attr_accessor :page_file_extension

    def initialize
      @rwiki_path = Dir.pwd
      @root_page_name = 'Home'
      @page_file_extension = 'txt'
    end

    def root_page_path
      '/' + root_page_name
    end

    def root_page_full_path
      File.join(rwiki_path, root_page_path)
    end

    def root_page_full_file_path
      root_page_full_path + '.' + page_file_extension
    end

    def version
      Rwiki::Version::STRING
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rwiki-0.2.5 lib/rwiki/configuration.rb