Gistlib Logo

gistlib

other ruby categories

conditionals code snippets in ruby

check if array is not empty in ruby
find the nth prime number in ruby
find the shortest word in a string in ruby
how to check if a number is in an array? like `5 in [1, 3, 5]`? in ruby
if a file.txt is in the same directory, can i use load to load it into my function that should read the contents to screen? how? in ruby
write a method to return true if the input string equals 'cool' otherwise return false in ruby

gistlibby LogSnag