module GollumRails::Core::ClassMethods

Public Instance Methods

folder=(options)
Alias for: set_folder
format_supported?(format) click to toggle source

Checks if the fileformat is supported

format - String

Returns true or false

# File lib/gollum_rails/core.rb, line 27
def format_supported?(format)
  Gollum::Markup.formats.include?(format.to_sym)
end
reset_folder() click to toggle source

Resets the folder to /

# File lib/gollum_rails/core.rb, line 32
def reset_folder
  set_folder(nil)
end
set_folder(options) click to toggle source

Sets the folder

# File lib/gollum_rails/core.rb, line 37
def set_folder(options)
  if options.is_a? Hash
    return if options.empty?
    base = options[:base]
    options = options[:folder]
  end
  Setup.wiki_options ||= {}
  Setup.wiki_options[:page_file_dir] = options

  Setup.wiki_options[:base_path] = (base || options) || ''
end
Also aliased as: folder=