Class: PerlDoc
- Inherits:
-
AbstractIndex
- Object
- AbstractIndex
- PerlDoc
- Defined in:
- lib/langhelp/lh_perl.rb
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
Methods inherited from AbstractIndex
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
#collect_files ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/langhelp/lh_perl.rb', line 93 def collect_files @modules = @perl_path.map {|dir| modules = [] Dir.chdir(dir) do [ Dir["**/*.pod"]+Dir["**/*.pm"]+Dir["**/*.pl"] ].flatten.each do |pod| next if pod =~ /^pod\// modules << pod.gsub(/\//, '::').gsub(/\.[^\.]+$/,'') end end modules }.flatten.sort.uniq end |
#init(x = {}) ⇒ Object
88 89 90 91 |
# File 'lib/langhelp/lh_perl.rb', line 88 def init(x={}) @perl_path = x[:perl_path] normalize_filename! *@perl_path end |