Created
January 25, 2012 02:20
-
-
Save johnduhart/1674210 to your computer and use it in GitHub Desktop.
Ruby script to generate a map of core classes for auto completion by IDEs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bootstrap = File.open('fuel/core/bootstrap.php', 'r').read | |
class_map = <<-php | |
<?php | |
/** | |
* This file is a map of all the fuel core classes, for auto completion on PhpStorm | |
* @ignore | |
*/ | |
class Autoloader extends Fuel\\Core\\Autoloader {} | |
php | |
bootstrap.scan(/'Fuel\\\\Core\\\\([A-Za-z_]+)'/) do |c| | |
class_map << "class #{c[0]} extends Fuel\\Core\\#{c[0]} {}\n" | |
end | |
File.open('classes.php', 'w') { |f| f.write class_map } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment