Skip to content

zradford/swimming_bool

Repository files navigation

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
end

You can even write your code to be more polite:

def should_update_some_attribute
  return no_thanks if some_condition?

  yes_please 
end

If 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

About

Cool Bool Tools

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors