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
27 28 29 |
# File 'lib/gollum_rails/core.rb', line 27 def format_supported?(format) Gollum::Markup.formats.include?(format.to_sym) end |
#reset_folder ⇒ Object
Resets the folder to /
32 33 34 |
# File 'lib/gollum_rails/core.rb', line 32 def reset_folder set_folder(nil) end |
#set_folder(options) ⇒ Object Also known as: folder=
Sets the folder
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/gollum_rails/core.rb', line 37 def set_folder() if .is_a? Hash return if .empty? base = [:base] = [:folder] end Setup. ||= {} Setup.[:page_file_dir] = Setup.[:base_path] = (base || ) || '' end |