I am building an iOS app using Rubymotion. I need to cache remote images located in a table view. I am trying to use the Cocoapod called “JMImageCache” found here: https://github.com/jakemarsh/JMImageCache.
I cannot figure out how to use it and how to convert the objective-c code to Ruby.
This is the Objective-C code:
UIImage *image = [[JMImageCache sharedCache] imageForURL:@"http://dundermifflin.com/i/MichaelScott.png" delegate:self];
I tried to convert it like this but it is wrong:
image = JMImageCache.sharedCache(imageForURL:post.image_medium, delegate:self)
Try this:
imageForURLis a method onsharedCache,sharedCachereturns an object, but you were sending it arguments like it was a method.