Module: GollumRails::Core::ClassMethods
- Defined in:
- lib/gollum_rails/core.rb
Instance Method Summary collapse
-
#format_supported?(format) ⇒ Boolean
Checks if the fileformat is supported.
-
#reset_folder ⇒ Object
Resets the folder to /.
-
#set_folder(options) ⇒ Object
(also: #folder=)
Sets the folder.
Instance Method Details
#format_supported?(format) ⇒ Boolean
Checks if the fileformat is supported
format - String
Returns true or false
12 13 14 |
# File 'lib/gollum_rails/core.rb', line 12 def format_supported?(format) Gollum::Markup.formats.include?(format.to_sym) end |
#reset_folder ⇒ Object
Resets the folder to /
17 18 19 |
# File 'lib/gollum_rails/core.rb', line 17 def reset_folder set_folder(nil) end |
#set_folder(options) ⇒ Object Also known as: folder=
Sets the folder
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gollum_rails/core.rb', line 22 def set_folder() if .is_a? Hash return if .empty? base = [:base] = [:folder] end Setup. ||= {} Setup.[:page_file_dir] = Setup.[:base_path] = (base || ) || '' end |