Method: XcodePages.doxygen
- Defined in:
- lib/XcodePages.rb
.doxygen ⇒ Object
Launches Doxygen.
The implementation derives the Doxygen project name from the environment PROJECT_NAME variable. Xcode passes this variable. Typically, it is a camel-cased name. Using ActiveSupport (part of the Rails framework) the implementation below derives a humanised title; effectively puts spaces in-between the camels!
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/XcodePages.rb', line 95 def self.doxygen IO.popen('doxygen -', 'r+') do |doxygen| doxygen.puts " PROJECT_NAME = \#{ENV['PROJECT_NAME'].titleize}\n PROJECT_NUMBER = \#{project_number}\n OUTPUT_DIRECTORY = \#{output_directory}\n TAB_SIZE = 4\n EXTENSION_MAPPING = h=Objective-C\n INPUT = \#{input}\n SOURCE_BROWSER = YES\n HTML_TIMESTAMP = NO\n GENERATE_LATEX = NO\n EOF\n\n # Let the user override the previous defaults by loading up the Doxyfile\n # if one exists. This should appear in the source root folder.\n if File.exists?('Doxyfile')\n doxygen.write File.read('Doxyfile')\n end\n\n # Close the write-end of the pipe.\n doxygen.close_write\n\n # Read the read-end of the pipe and send the lines to standard output.\n puts doxygen.readlines\n end\nend\n" |