Module: Nwiki::Utils
- Defined in:
- lib/nwiki/utils.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.orgfile?(path) ⇒ Boolean
7 8 9 |
# File 'lib/nwiki/utils.rb', line 7 def self.orgfile? path ::File.extname(path) == ".org" end |
.page_title(path) ⇒ Object
3 4 5 |
# File 'lib/nwiki/utils.rb', line 3 def self.page_title path path.empty? ? '' : "#{path.gsub(/\.org$/, '').gsub(/^\//, '')} - " end |
Instance Method Details
#strip_org(path) ⇒ Object
11 12 13 |
# File 'lib/nwiki/utils.rb', line 11 def strip_org path path.gsub(/\.org$/) { '' } end |