lib/runtime/engine.rb in factor-0.0.93 vs lib/runtime/engine.rb in factor-0.0.94
- old
+ new
@@ -25,10 +25,10 @@
# load the channel by referencing the .rb file
# the filename is lowercase with "_" for spaces
# and the module inside must be camal cased to match
# once loaded it is in the channel_modules Hash
def load_channel filename
- file= filename.is_a?(String) ? File.new filename : filename
+ file= filename.is_a?(String) ? File.new(filename) : filename
require file
channel_module_name = File.basename(file).gsub('.rb','').split('_').map{|ea| ea.capitalize}.join('')
channel_module= self.class.const_get(channel_module_name)
@channel_modules[channel_module.definition["module"]]=channel_module
end
\ No newline at end of file