Class: PHPManual

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

Overview

This program is free software; you can redistribute it and/or modify

it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
  This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
  You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

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

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



19
20
21
22
23
# File 'lib/langhelp/lh_php.rb', line 19

def init(x={})
  @dir = arg1
  @glob = x[:glob]
  normalize_filename! @dir
end

#to_e(out) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/langhelp/lh_php.rb', line 25

def to_e(out)
  Dir[File.join(@dir, @glob)].each do |fullpath|
    basename = File.basename fullpath
    node = basename.sub(/\.html$/, '')
    section, function = node.split(/\./,2)
    function.gsub!(/-/, '_')
    out << %Q!# #{function}#{SPACES}(lh-w3m "" #{lisp_dump_string(fullpath)})\n!
  end
end