Sha256: 1973d541ece3688dcb10782112235942129559143d930ade008fc8c5d54db53c
Contents?: true
Size: 624 Bytes
Versions: 17
Compression:
Stored size: 624 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}">#{e}</a></li>! }.join + '</ul>' end end end end
Version data entries
17 entries across 17 versions & 1 rubygems