RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

nithinbekal — 9 posts

http://nithinbekal.com

Decorator Pattern in Ruby  nithinbekal.com
Decorators allow us to add behavior to objects without affecting other objects of the same class. The decorator pattern is a useful alternative to creating sub-classes. We will look at an example where we use subclassing to solve a problem, and then look at how decorator objects provide a better solution. [Continue reading...]
Presenters in Rails  nithinbekal.com
When your models are bloated with methods that are only used in views, it might be a good time to refactor them. Moving that logic into helper modules might be OK in some cases, but as the complexity of your views grows, you might want to look at presenters. In this article, I will walk through how I refactored views to use presenters instead of helper methods. [Continue reading...]
The Law of Demeter  nithinbekal.com
I wrote a blog post explaining the Law of Demeter with a simple example in Ruby.
I wrote up the 5th part of the series of blog posts about writing Ruby gems. This one is about setting up Rspec to test your gem. If you missed the previous posts, you can find all the posts linked here.
Guide to writing Ruby gems  nithinbekal.com
I wrote a bunch of posts for beginners about how to get started writing a new Ruby gem. I'll be adding more posts soon, but for now I've finished four short posts.

You can see all the links in one place here or go to the individual pages here:

Part 1 - Gem specifications
Part 2 - Adding some code
Part 3 - Publishing to rubygems.org
Part 4 - Setting up Test::Unit
Here's my review of The Rails 3 Way by Obie Fernandez.
I finished reading Russ Olsen's new book Eloquent Ruby a few days ago. Here's my review of the book.
Using Haml with Rails  nithinbekal.com
A short introduction to getting started with using Haml instead of Erb with Rails.
I just created the gem spellingbee which is a spelling correction tool. It's my first gem, so it has way too many bugs to fix, but I'd appreciate feedback on how to improve it. Please do fork it on github and improve it or report a bug here.