The Ruby API is full of hidden-in-plain-sight libraries that you’ll probably find extremely useful if only you knew they were there in the first place.For instance if you go to the Ruby Doc Standard Library right at the top, the only entry under ‘A’ is Abbrev, a one function API that might save some trouble when it comes to text processing.
The single function of the Abbrev library is to “calculate the set of unique abbreviations for a given set of strings”. Put slightly more simply given an array of strings, Abbrev will return a list of unique non-ambiguous prefixes for each string such that no two strings have the same prefix. So given the words ‘fox’ and ‘fig’ the unique abbreviations for ‘fox’ are ‘fo’ and ‘fox’ and for ‘fig’ is ‘fi’ and ‘fig’ with the prefix of ‘f’ being ambiguous and therefore excluded.
Continue reading Rediscovering Ruby: Abbrev...
Talk: Capistrano by Nick Coyne
Date: 12th May 2010
Time: 19:00
Venue: Sudoroom, 5th Floor Bandwidth Barn, 125
Buitengracht, Cape Town
RSVP @ Cape Town Ruby Brigade
Topic: Testing with Factory Girl, Cucumber and Pickle
Speakers: Jolwyn Pawlyn and Alex Tomkins from Unboxed Consulting
Factory Girl: http://github.com/thoughtbot/factory_girl
Cucumber: http://www.cukes.info
Pickle: http://ianwhite.github.com/pickle/
Date: 14th April 2010
Time: 19:00
Venue: Sudoroom, 5th Floor Bandwidth Barn, 125 Buitengracht St, Cape
Town
Aimred is a specialist Ruby and Ruby on Rails development house and consultancy based in Cape Town, South Africa.
We provide Ruby and Ruby on Rails development, consulting and training services to businesses and organisations of all sizes. If you want to find out how we can help you, contact us at info@aimred.com.
Ruby is an object oriented programming language that is designed to make development as quick and painless as posssible. Taking the best practices from a number of other languages, Ruby
Ruby is on the cutting edge of web development technology, not only through the Ruby on Rails framework, but also through new and exciting frameworks such as Merb and Sequel.
Ruby is also ideal for traditional application development and available APIs allow Ruby to create cross platform GUI applications for Linux, Apple OS X, Microsoft Windows and Sun Solaris.