TIL

Mar
15
Ruby's Looping Suffixes

Ruby's Looping Suffixes

One-line looping in Ruby
Mar
11
Default Values for Ruby Hashes

Default Values for Ruby Hashes

Setting a default for ruby hashes which returns a new object
Jul
31
TIL: Counting Consecutive Items in a Ruby Array

TIL: Counting Consecutive Items in a Ruby Array

I wanted to know how many times a thing occurs consecutively in array. Only consecutive items are important
Jul
30
TIL: Ruby Splat Operator Builds Arrays

TIL: Ruby Splat Operator Builds Arrays

You can use the splat operator to coerce values into arrays
1 min read
Jul
29
TIL: Denaturing Ruby Array to get the Last Element and Remainder

TIL: Denaturing Ruby Array to get the Last Element and Remainder

Assigning the first element and the remainder of an array to a variable is common, but you can also do the same in reverse
1 min read
Jul
17
Inline Bundler for Ruby Scripts

Inline Bundler for Ruby Scripts

You can write a simple Ruby script which includes in-line bundler and so avoids the need to have a separate Gemfile.
Jul
14
TIL: Finding the Source of a Ruby Method

TIL: Finding the Source of a Ruby Method

Find out where the source of a method is defined
Jul
13
TIL: Lambda Composition in Ruby

TIL: Lambda Composition in Ruby

Joining lambdas together for fun and profit
Jul
12
TIL: Ruby Currying

TIL: Ruby Currying

If currying is a way to partially execute a function, here's how Ruby handles it
1 min read
Jul
11

TIL: Ruby Methods are Functions: Getting a Reference

I have to look this up every single time I want to do this: let's grab a reference to a Ruby method so we can pass it around