Enable no RubyMotion module search

Are mixins allowed in RubyMotion? I have a directory with two files. One is a class, the other is a module. When I include a module (mixin) in my class, I get an error not found. Is everything in the app automatically required in RM?

Thanks for any help.

+4
source share
2 answers

I use Bundler, so in the end I put something like this in the block Motion::Project::App.setup do |app| :

 app_files = app.files.reverse.pop app.files << Dir.glob(File.join(app.project_dir, 'lib/**/*.rb')) << app_files 

There is definitely a better way to do this.

+1
source

All Articles