cocoa - Use simple & useful ruby methods such as basename in RubyMotion -


rubymotion not support

require  

in code (only in rakefile).

is there way use useful classes built ruby not rubymotion ? instance, i'd able a

name=pathname.new("/path/to/some/file").basename 

rather cocoa equivalent

pathname 1 of pieces of ruby standard library not available in rubymotion.

you can try motionbundler, haven't been lucky that.

i'd suggest use cocoa equivalent. like:

name = "/path/to/some/file".lastpathcomponent 

not bad, anyway.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -