Access Ruby Docs from the OS X Dictionary and Spotlight

Tháng Hai 14, 2009

Source: http://www.rubyinside.com/access-ruby-19-docs-from-the-os-x-dictionary-and-spotlight-1495.html

ruby-spotlight-docs.pngPriit Haamer is an Estonia-based Ruby developer who has put together a “Ruby dictionary for Mac OS X.” All you have to do is download the file he provides, unzip it into your ~/Library/Dictionaries folder (or create that folder and unzip it in there) and you’ll be able to use the built-in OS X “Dictionary” application to search for Ruby module names, classes, and methods.

It is also possible to have Spotlight bring up entries from this dictionary too by going in to Dictionary’s preferences and dragging the new Ruby dictionary to the top of the priority list. If you have turned off the Dictionary option in Spotlight, you’d need to turn that back on too.

dictionary-mv.pngThe documentation Priit has used appears to be 1.9.1’s (Update: Priit claims it’s 1.8.6, but mine includes String#each_char which isn’t in my 1.8.6..). It has some flaws in that navigating from a method back up to a class is tricky, but it’s a promising start, and Priit says he’ll open source the code he used to produce the dictionaries in due course. He has also produced a Rails dictionary that works in the same way.

Gửi phản hồi

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Log Out / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Log Out / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Log Out / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Log Out / Thay đổi )

Connecting to %s

%d bloggers like this: