[MacRuby-devel] spotlight - MDItemRef

Alan Skipp al_skipp at fastmail.fm
Thu Oct 29 04:43:23 PDT 2009

It's really simple, you just need to create an Objective-C class in your
macruby application (header and implementation file). You can then use
it in your ruby code without any hassle, it's great. For example, if you
create an Objective-C class called 'MetaDataHelper', you can use it like
helper = MetaDataHelper.new

and call methods on it like any other ruby object, eg:

metadata = helper.metadataForFile('/path/to/file/')

I can post a code example later today, if that would be helpful.

On Thu, 29 Oct 2009 09:27 +0000, "Ruben Fonseca" <ruben at 0x82.com> wrote:
> Hi Laurent!
> On Oct 28, 2009, at 12:31 AM, Laurent Sansonetti wrote:
> > and to wrap this C API into an Objective-C class that you can call  
> > from MacRuby in the meantime.
> >
> > Laurent
> Just a quick question. Imagine I have an Objective-C class that wraps  
> that API. How can I then use it on a Macruby script? I probably have  
> to compile it somewhere...
> Ruben
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
  Alan Skipp
  al_skipp at fastmail.fm

http://www.fastmail.fm - One of many happy users:

More information about the MacRuby-devel mailing list