Sha256: f9ba927735215e5300e0ef258f8f29617b130a3ede088ede2279b3e6d3361eb6
Contents?: true
Size: 641 Bytes
Versions: 13
Compression:
Stored size: 641 Bytes
Contents
module Nwiki module Core class Directory class << self attr_accessor :encoding end attr_reader :list def initialize path, list @path = path @list = list. select { |e| e =~ /\.org$/ }. map { |e| e.sub(/\.org$/){ '' } } end def title @path end def encoding self.class.encoding end def to_html '<ul>' + @list.map { |e| root = './' root << @path if @path != '/' %Q!<li><a href="#{root}#{e.gsub('#', '%23')}">#{e}</a></li>! }.join + '</ul>' end end end end
Version data entries
13 entries across 13 versions & 1 rubygems