Skip to content

Instantly share code, notes, and snippets.

@ryanckulp ryanckulp/unless_good.rb
Last active Jan 2, 2018

What would you like to do?
intuitive use case for unless...end statement in Ruby
require 'date'
def date_night? == 5 # friday
unless date_night?
puts "study hard!"
# shorthand also works...
puts "study hard!" unless date_night?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.