RubyMotion does not support
require
in code (only in RakeFile).
Is there a way to use useful classes built into Ruby but not into RubyMotion ? For instance, I'd like to be able to do a
name=Pathname.new("/path/to/some/file").basename
rather than look for Cocoa equivalent
Pathnameis one of those pieces of the Ruby Standard Library that are not available in RubyMotion.You can try with MotionBundler, but I personally haven't been very lucky with that.
I'd suggest to use the Cocoa equivalent. Something like:
Not that bad, anyway.