You're going from procedural to object-oriented coding there. That's usually fine, but what if you're doing something like a factory method
if has_no_funny_characters?(title) create_object(title) else return nil end (assume you don't have activerecord and object.valid?) Andrew On Tue, Mar 10, 2009 at 4:09 PM, Tim Lucas <[email protected]> wrote: > > > if is_it_good?('apple') > > return it_is_awesome! > > end > > Get rid of any "it_is" or "is" in boolean methods please. > > empty? not is_empty? > > So something like: > > def respond_to_bad_joke > if @apple.good? > eat @apple > else > throw @apple > end > end > > A real example would be much better. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en -~----------~----~----~----~------~----~------~--~---
