The answe above will not work in this case because there is no listen_for methods defined in the custom.rb file
wrap whatever you have in custom.rb
in a module, like
module Foo
# commands
end
require your file custom.rb
on the top of your script and include it in your class:
require_relative './custom.rb'
class myClass()
include Foo
# code here
end
This is the new try
Remove the module
wrapper in the listen_for commands, and instead simply list them in the custom.rb
as you would do inside your main class definition. And in your main class, Read and eval it, like this:
class myClass()
eval(File.read('./custom.rb'))
# code here
end