Class: Manpage

Inherits:
AbstractIndex show all
Defined in:
lib/langhelp/langhelp-base.rb

Overview

Information index class by man

Defined Under Namespace

Modules: ManpageIndex, Manpages

Constant Summary

Constants inherited from AbstractIndex

AbstractIndex::SPACES

Constants included from LocalVariables

LocalVariables::ANCHOR_BEGIN, LocalVariables::ANCHOR_END

Constants included from KanjiConverter

KanjiConverter::KCONVERTERS

Instance Attribute Summary

Attributes inherited from AbstractIndex

#arg1, #conf, #title

Instance Method Summary collapse

Methods inherited from AbstractIndex

#initialize, #output_title, #to_e

Methods included from LocalVariables

#insert_local_variables

Methods included from FilenameString

#abbreviate_filename, #abbreviate_filename!, #normalize_filename!

Methods included from KanjiConverter

#encoding, #kconv

Methods included from MkArray

#mkarray

Methods included from EmacsLispString

#lisp_dump_string

Constructor Details

This class inherits a constructor from AbstractIndex

Instance Method Details

#init(x = {}) ⇒ Object



267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/langhelp/langhelp-base.rb', line 267

def init(x={})
  if x[:manpath]
    @manpath = x[:manpath]
    @sections = arg1
    @glob = x[:glob] || '*'
    normalize_filename! *@manpath
    extend Manpages
  else
    @section = x[:section].to_s
    @name = arg1
    @default_regexp =  /^\S|^\s+\-/
    @additional_regexp = x[:regexp]
    extend ManpageIndex
  end
end