Created
March 1, 2012 21:46
-
-
Save gmcquillan/1953453 to your computer and use it in GitHub Desktop.
crazy ruby
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 | |
# | |
print "default = {:hbaseregion => {:handler_count => 25}}\n\n" | |
default = {:hbaseregion => {:handler_count => 25}} | |
print "testing defined?(default[:hbaseregion][:handler_count])\n" | |
if (defined?(default[:hbaseregion][:handler_count])) | |
print "yes\n\n" | |
else | |
print "no\n\n" | |
end | |
print "testing defined?(default[:hbaseregion][:buh])\n" | |
if (defined?(default[:hbaseregion][:buh])) | |
print "yes\n\n" | |
else | |
print "no\n\n" | |
end | |
print "testing defined?(default[:hbaseregion][:buh]).nil?\n" | |
if (defined?(default[:hbaseregion][:buh]).nil?) | |
print "yes\n\n" | |
else | |
print "no\n\n" | |
end | |
print "testing defined?(default[:hbaseregion][:handler_count]).nil?\n" | |
if (defined?(default[:hbaseregion][:handler_count]).nil?) | |
print "yes\n\n" | |
else | |
print "no\n\n" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment