While working on a project with Rein Henrichs he showed me a nice way to format code. I’m sharing.
Let’s pretend you have a method that can take many parameters, it happens.
def some_useful_method
my_method :parameter_one, :parameter_two, :parameter_three, :parameter_four
end
I’ve typically just kept the first parameter on the same line as the method call and tabbed [...]
Archive for the ‘Code Style’ Category
Cleaner Ruby
Posted in Code Style on February 3, 2009 | 1 Comment »
