Class: Grep
- Inherits:
-
AbstractIndex
- Object
- AbstractIndex
- Grep
- Includes:
- GrepInit
- Defined in:
- lib/langhelp/langhelp-base.rb
Overview
Information index class by grep
Constant Summary
Constants inherited from AbstractIndex
Constants included from LocalVariables
LocalVariables::ANCHOR_BEGIN, LocalVariables::ANCHOR_END
Constants included from KanjiConverter
Instance Attribute Summary
Attributes inherited from AbstractIndex
Instance Method Summary collapse
-
#to_e(io) ⇒ Object
Dump into e-script.
Methods included from GrepInit
Methods inherited from AbstractIndex
#init, #initialize, #output_title
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
This class inherits a constructor from AbstractIndex
Instance Method Details
#to_e(io) ⇒ Object
Dump into e-script
355 356 357 358 359 360 361 362 |
# File 'lib/langhelp/langhelp-base.rb', line 355 def to_e(io) src = abbreviate_filename(@src) kconv{ File.zread(@src) }.grep(@regexp).map{|line| line.chomp! next if @exclude.any?{|exclude| exclude === line } io << %Q!# (lh-view #{lisp_dump_string(line)}#{SPACES}#{lisp_dump_string(src)})\n! } end |