Class: AutomaticMultiPageIndex
- Inherits:
-
Object
- Object
- AutomaticMultiPageIndex
- Defined in:
- lib/helpers/default-helpers.rb
Instance Method Summary collapse
-
#initialize(wiki, pageroot = "Site Index", author = "AutomaticIndex") ⇒ AutomaticMultiPageIndex
constructor
A new instance of AutomaticMultiPageIndex.
Constructor Details
#initialize(wiki, pageroot = "Site Index", author = "AutomaticIndex") ⇒ AutomaticMultiPageIndex
Returns a new instance of AutomaticMultiPageIndex.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/helpers/default-helpers.rb', line 244 def initialize( wiki, pageroot = "Site Index", = "AutomaticIndex" ) ('A'..'Z').each do |letter| AutomaticList.new( wiki, "#{pageroot} #{letter}.", :author => , :sort_pages_by => :name_for_index ) do |page| if page.name =~ /^#{Regexp.escape(pageroot)} ([a-z]|Other)\./i false else page.name =~ /^#{letter}.*/i end end end AutomaticList.new( wiki, "#{pageroot} Other.", :author => , :sort_pages_by => :name_for_index ) do |page| if page.name =~ /^#{Regexp.escape(pageroot)} ([a-z]|Other)\./i false else page.name =~ /^[^A-Za-z].*/i end end AutomaticList.new( wiki, pageroot, :author => , :sort_pages_by => :name_for_index ) do |page| page.name =~ /^#{Regexp.escape(pageroot)} ([a-z]|Other)\./i end end |