factor 0.0.94 → 0.0.95
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/runtime/engine.rb +3 -3
- metadata +1 -1
data/lib/runtime/engine.rb
CHANGED
@@ -27,9 +27,9 @@ module Factor
|
|
27
27
|
# and the module inside must be camal cased to match
|
28
28
|
# once loaded it is in the channel_modules Hash
|
29
29
|
def load_channel filename
|
30
|
-
|
31
|
-
require
|
32
|
-
channel_module_name = File.basename(
|
30
|
+
filename = File.absolute_path(File.expand_path(filename.path)) if filename.is_a?(File) # just in case someone passes in a File not a String (i.e. me)
|
31
|
+
require filename
|
32
|
+
channel_module_name = File.basename(filename).gsub('.rb','').split('_').map{|ea| ea.capitalize}.join('')
|
33
33
|
channel_module= self.class.const_get(channel_module_name)
|
34
34
|
@channel_modules[channel_module.definition["module"]]=channel_module
|
35
35
|
end
|