Articles Index
How Can I Use a Spinner Method in Ruby?
A spinner method provides the user with visual feedback that something is happening in the background. For Ruby programs that require long wait times, a spinner can be a good addition.
How Can I Benchmark Code in Ruby?
Benchmarking measures the time it takes to execute code and compares it to other code that accomplishes the same task. This is useful to see which is faster, and gives you the opportunity to use the faster code in your program.
Can I add empty directories to Git repositories?
Can I add empty directories to Git repositories?
How Can I Store Key/Value Pairs in Ruby?
Storing key/value pairs in Ruby doesn't always need to be accomplished by using a hash. You can also use the Struct and OpenStruct classes.
How Can I Rotate an Array in Ruby?
Rotating an array is not something the default Ruby library includes. However, it is quite easy and by using Ruby's open classes, you can add it to the Array class yourself
How do I round a float down if it's close to a whole number?
Is there a nice way to get the floating-point value of a number if it's floating-point, but the integer value if it's just X.0?
