ruby

Feb
04
Playing with Ruby Ractors

Playing with Ruby Ractors

Exploring Ractors with Ruby 3.0
3 min read
Dec
13
Fun with Ruby Pattern Matching

Fun with Ruby Pattern Matching

Pattern matching emerged in experimental status in Ruby 2.7, I got my first chance to properly play with an implementation that uses it
2 min read
Oct
29
A Gem that Provides Rake Tasks

A Gem that Provides Rake Tasks

I'm building a Gem and I want it to provide Rake tasks when it is used in other projects
1 min read
Oct
28
ActiveRecord without Rails

ActiveRecord without Rails

I needed a quick and simple database to use with a plain old ruby project, taking ActiveRecord on it's own is pretty easy
3 min read
Aug
18
TIL: Asserting Exceptions with Cucumber & Ruby

TIL: Asserting Exceptions with Cucumber & Ruby

Proper use of Cucumber follows a strict given-when-then syntax. This posses a small problem when trying to assert an exception in a 'then' step if it is raised in a 'when' step.
1 min read
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
15
Mini Ruby DSL Template

Mini Ruby DSL Template

Spawning quick DSLs for fun and profit is super easy with Ruby. This toy is a template for stealing for something useful.
1 min read