-
-
Save leejarvis/77f94d79e4694df07a7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def print_object(object) | |
if object | |
puts object | |
else | |
puts "Object was nil or false!" | |
end | |
end | |
print_object "Foo" | |
print_object [] | |
print_object nil | |
print_object(foo: "bar") | |
print_object false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment