Class: AbstractIndex
- Includes:
- EmacsLispString, FilenameString, KanjiConverter, LocalVariables, MkArray
- Defined in:
- lib/langhelp/langhelp-base.rb
Overview
Abstract class of information index
Direct Known Subclasses
AbstractLink, Grep, HTML, HTML::SingleHTML, HTMLIndex, Info, LuaHelp, Manpage, PHPManual, PerlDoc, PerlFunc, PodSections, W3MExtractLinks, W3MGrep
Constant Summary collapse
- SPACES =
"\t"
Constants included from LocalVariables
LocalVariables::ANCHOR_BEGIN, LocalVariables::ANCHOR_END
Constants included from KanjiConverter
Instance Attribute Summary collapse
-
#arg1 ⇒ Object
readonly
1st parameter ie.
-
#conf ⇒ Object
Hash specified by configuration file.
-
#title ⇒ Object
The title of the index.
Instance Method Summary collapse
-
#init(x = {}) ⇒ Object
Initialize for subclass.
-
#initialize(x = {}) ⇒ AbstractIndex
constructor
A new instance of AbstractIndex.
- #output_title(io) ⇒ Object
-
#to_e(io) ⇒ Object
Dump into e-script.
Methods included from LocalVariables
Methods included from FilenameString
#abbreviate_filename, #abbreviate_filename!, #normalize_filename!
Methods included from KanjiConverter
Methods included from MkArray
Methods included from EmacsLispString
Constructor Details
#initialize(x = {}) ⇒ AbstractIndex
Returns a new instance of AbstractIndex.
147 148 149 150 151 152 |
# File 'lib/langhelp/langhelp-base.rb', line 147 def initialize(x={}) @title = x[:title] @arg1 = x[self.class.to_s.intern] @conf = x[:conf] init x end |
Instance Attribute Details
#arg1 ⇒ Object (readonly)
1st parameter ie. the key is a symbol of class name
160 161 162 |
# File 'lib/langhelp/langhelp-base.rb', line 160 def arg1 @arg1 end |
#conf ⇒ Object
Hash specified by configuration file.
163 164 165 |
# File 'lib/langhelp/langhelp-base.rb', line 163 def conf @conf end |
#title ⇒ Object
The title of the index.
166 167 168 |
# File 'lib/langhelp/langhelp-base.rb', line 166 def title @title end |
Instance Method Details
#init(x = {}) ⇒ Object
Initialize for subclass. Do not process files! only do initialization.
156 157 |
# File 'lib/langhelp/langhelp-base.rb', line 156 def init(x={}) end |
#output_title(io) ⇒ Object
172 173 174 175 176 |
# File 'lib/langhelp/langhelp-base.rb', line 172 def output_title(io) if title io.puts "#### #{ANCHOR_BEGIN}#{title}#{ANCHOR_END} ####" end end |
#to_e(io) ⇒ Object
Dump into e-script
179 180 |
# File 'lib/langhelp/langhelp-base.rb', line 179 def to_e(io) end |