ariejan/imdb — pull request #66 by gumatias (2014-12-01 07:20:06+00:00)
Title: Title now has awards

Hi, I'm sorry to "bother" again. It's just that I really like this project as a way to teach me Ruby and I couldn't help but add a tiny feature while playing with it. I thought I'd send another pull request in case you find it interesting.

One thing I wanted to mention is that I'm not very happy with the way I parse the awards, as it looks more complicated than I think it should be.. I'm sure there's a bunch of other code smells so please don't hesitate on pointing it out, I don't mind making improvements.

The feature is about allowing titles/movies to return awards, which I think it might be helpful for someone hopefully.

award = Imdb::Award.new('Oscar', category: 'Best Sound', winner: false, nominees: ['Don J. Bassman', 'Kevin F. Cleary', 'Richard Overton', 'Al Overton Jr.'])

award.name #=> Oscar
award.winner? #=> false
award.category #=> Best Sound
award.nominees #=> ['Don J. Bassman', 'Kevin F. Cleary', 'Richard Overton', 'Al Overton Jr.']

based on: http://akas.imdb.com/title/tt0095016/awards

This is certainly not its final version since there are a few fields missing such as: event (name and year), but I intend to keep playing/learning with this project a little more :)