Sha256: 1f2e4519bf29a0d2e0f28173abfe44046611530b3dadbfe9d54a6f4646888d85
Contents?: true
Size: 506 Bytes
Versions: 11
Compression:
Stored size: 506 Bytes
Contents
module Precious module Helpers # Extract the path string that Gollum::Wiki expects def extract_path(file_path) return nil if file_path.nil? last_slash = file_path.rindex("/") if last_slash file_path[0, last_slash] end end # Extract the 'page' name from the file_path def extract_name(file_path) ::File.basename(file_path) end def sanitize_empty_params(param) [nil,''].include?(param) ? nil : CGI.unescape(param) end end end
Version data entries
11 entries across 11 versions & 1 rubygems