-
-
Save Gizmokid2005/3478babb57d39a94d4bd to your computer and use it in GitHub Desktop.
Dynamically gather plugins
This file contains hidden or 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
plugins = Array.new | |
Dir["../plugins/*.rb"].each_with_index do |file, i| | |
IO.foreach(file) do |p| | |
if p.match(/^class/) | |
plugins.push(p.split('class ').last.strip) | |
#puts plugins.inspect | |
#puts plugins.class | |
else | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment