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 -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -