Class: Xezat::Detector::PythonDocutils

Inherits:
Object
  • Object
show all
Defined in:
lib/xezat/detector/python-docutils.rb

Instance Method Summary collapse

Instance Method Details

#detect(variables) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/xezat/detector/python-docutils.rb', line 6

def detect(variables)
  Find.find(variables[:S]) do |file|
    next unless file.end_with?(File::SEPARATOR + 'configure.ac') || file.end_with?(File::SEPARATOR + 'configure.in')
    File.foreach(file) do |line|
      return true if (line.lstrip.start_with?('AC_CHECK_PROG') && line.index('rst2man').is_a?(Integer))
    end
  end
  false
end