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
I needed a quick and simple database to use with a plain old ruby project, taking ActiveRecord on it's own is pretty easy
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.
I wanted to know how many times a thing occurs consecutively in array. Only consecutive items are important
You can use the splat operator to coerce values into arrays.
Assigning the first element and the remainder of an array to a variable is common, but you can also do the same in reverse
You can write a simple Ruby script which includes in-line bundler and so avoids the need to have a separate Gemfile.
Spawning quick DSLs for fun and profit is super easy with Ruby. This toy is a template for stealing for something useful.
Find out where the source of a method is defined
If currying is a way to partially execute a function, here's how Ruby handles it