Cool Bool Tools For Bool Fools
Get out of the kiddie pool using just true and false and dive into yes and no
def can_do_action?
return no if lacks_ability?
yes
endYou can even write your code to be more polite:
def should_update_some_attribute
return no_thanks if some_condition?
yes_please
endIf you really want to get into the deep end though, get rid of all your !! and use to_bool
def does_my_pool_exist
my_pool.to_bool
end