RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Submit a post

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

How to convert a Ruby primitive to a custom domain object in two minutes

You already know why you want to use domain objects instead of Ruby’s built-in primitives… but what do you do if you’ve already used strings and integers all over the place? Did you code yourself into a corner? Are you going to have to change lots of code, and potentially break things? Of course not! You can convert a Ruby primitive into a custom domain object in just a few minutes…

A quick tour of metaprogramming

If you pry into the beating heart of any Rails application, any testing framework, any beautiful DSL, you’ll find it filled with metaprogramming: code that writes code. In fact, a lot of the features Ruby devs use would be impossible without it. Yet many of us prefer to avoid metaprogramming in our own code. This is a brief tour of metaprogramming for Rubyists. http://www.rubyletter.com/newsletter/2017/05/26/metaprogramming.html

Loading older posts