Permalink
Browse files

fix autoload

  • Loading branch information...
rdp committed Oct 17, 2012
1 parent 98c8763 commit 470277bb18a6f5ebf6fd43a571c22309a5cec7da
Showing with 7 additions and 3 deletions.
  1. +6 −2 lib/simple_gui_creator.rb
  2. +1 −1 spec/ffmpeg_helpers.spec.rb
@@ -13,13 +13,17 @@ def self.snake_case string
require File.dirname(__FILE__) + '/simple_gui_creator/simple_gui_creator_main.rb'
-# some autoloads, in case they save any load time...
+# some autoloads, in case they save load time...
+
# not in the SGC namespace since they're somewhat separate from GUI control...which seems a bit weird...
-for clazz in [:FfmpegHelpers, :DriveInfo, :MouseControl, :PlayAudio, :PlayMp3Audio, :RubyClip, :Storage]
+for clazz in [:DriveInfo, :MouseControl, :PlayAudio, :PlayMp3Audio, :RubyClip, :Storage]
new_path = File.dirname(__FILE__) + '/simple_gui_creator/' + SimpleGuiCreator.snake_case(clazz) + '.rb'
autoload clazz, new_path
end
+# special case :P
+autoload :FFmpegHelpers, File.dirname(__FILE__) + '/simple_gui_creator/ffmpeg_helpers.rb'
+
module SimpleGuiCreator
autoload :ParseTemplate, File.dirname(__FILE__) + '/simple_gui_creator/parse_template.rb'
end
@@ -1,6 +1,6 @@
require 'common'
-describe FfmpegHelpers do
+describe FFmpegHelpers do
it "should work" do
end

0 comments on commit 470277b

Please sign in to comment.