Good Ruby Idiom: and/or operators
Any tutorial and book will teach you there are two sets of similar operators in Ruby:
|for bit operations, but that’s not the case today). But typical tutorial will not provide further explanation why we need both of those pairs.
Tricks with RSpec components outside RSpec
In this short post I’d like to show how some of RSpec components (matchers and expectations) can be used for a greater good outside your tests. Like in your normal everyday scripts.
Object Orientation in Ruby and Elixir
When talking about mainstream programming languages, we often put them into two major buckets: object oriented programming and functional programming. There are other programming paradigms but we act like OOP and FP are oil and water. In this article I'll be blurring the lines of these two paradigms.
Rails 5 adds ability to create module and class level variables on per thread basis
Rails already provides methods for creating class level and module level variables in the form of cattr_* and mattr_* suite of methods.
In Rails 5, we can go a step further and create thread specific class or module level variables.
Better Nested Attributes in Rails with the Cocoon Gem
In this article we are going to discuss how to build more complex forms using Rails’ nested attributes feature. I will show you how to manipulate multiple associated records from a single form and properly set up the models and controller to enable this feature.
Good Module Bad Module
You already know how to use modules in Ruby, but are you abusing them? In this post, we’ll take a look at different ways to program with modules and why they may or may not be a great idea.
Raptor: A Forthcoming Ruby Web Server for Faster App Deployment
Raptor bills itself as a new Ruby "app server” and it claims to blow everything else out of the water performance-wise (by between 2-4x!) whether that’s Unicorn, Puma, Passenger, or even TorqueBox on JRuby.
Ruby’s Unary Operators and How to Redefine Their Functionality
In math, a unary operation is an operation with a single input. In Ruby, a unary operator is an operator which only takes a single 'argument' in the form of a receiver. For example, the
7 Ruby Articles to Read Over The Holiday Season
So here we are right in the down period between Christmas and the start of the New Year. Few big releases or new developments come out at this time of the year, so it's a good time to either enjoy time offline or.. to get reading some insightful articles we wouldn't normally have time for! Luckily a few Rubyists have been busy spending the end of December putting together some rather good articles.. so get reading: