Sha256: 722401970e405bb1a6981d9b34ba004ca8a34d993c2984e33b32faede6ada0c0

Contents?: true

Size: 286 Bytes

Versions: 15

Compression:

Stored size: 286 Bytes

Contents

module Nwiki
  module Utils
    def self.page_title path
      path.empty? ? '' : "#{path.gsub(/\.org$/, '').gsub(/^\//, '')} - "
    end

    def self.orgfile? path
      ::File.extname(path) == ".org"
    end

    def strip_org path
      path.gsub(/\.org$/) { '' }
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
nwiki-0.3.3 lib/nwiki/utils.rb
nwiki-0.3.2 lib/nwiki/utils.rb
nwiki-0.3.1 lib/nwiki/utils.rb
nwiki-0.3.0 lib/nwiki/utils.rb
nwiki-0.2.11 lib/nwiki/utils.rb
nwiki-0.2.10 lib/nwiki/utils.rb
nwiki-0.2.9 lib/nwiki/utils.rb
nwiki-0.2.8 lib/nwiki/utils.rb
nwiki-0.2.7 lib/nwiki/utils.rb
nwiki-0.2.6 lib/nwiki/utils.rb
nwiki-0.2.5 lib/nwiki/utils.rb
nwiki-0.2.4 lib/nwiki/utils.rb
nwiki-0.2.3 lib/nwiki/utils.rb
nwiki-0.2.2 lib/nwiki/utils.rb
nwiki-0.2.1 lib/nwiki/utils.rb