This is a collection of useful(ish) Ruby snippets. The snippets are all simple self-contained pieces of code (a class or subroutine), but non of them are large enough to require having a repository in their own right.
Name | Description |
---|---|
keep-max.rb | Pass in two numbers and keep the larger of the two. |
keep-min.rb | Pass in two numbers and keep the smaller of the two. |
seconds-to-hms.rb | Convert seconds to hours, minute and seconds. |