Have you ever wondered what it meant to “mixin” functionality into your classes? Have you seen include and extend used in Ruby code and wondered what was going on? If so, then you’ve come to the right place. Mixins can offer a…
Continue Reading… Haml is an XHTML Abstraction Markup Language that, according to haml-lang.com: functions as a replacement for inline page templating systems such as PHP, ASP, and ERB It can be used in many Ruby frameworks, such as Rails and Sinatra, in Node.js, PHP…
Continue Reading… If you’re working with Ruby, chances are by now you’ve heard the word “metaprogramming” thrown around quite a lot. You may have even used metaprogramming, but not fully understood the true power or usefulness of what it can do. By the end of this article, you should have a firm grasp not only of what it is, but also what it capable of, and how you can harness one of Ruby’s “killer features” in your projects.
Continue Reading… Our resident PHP developer Mal Curtis checks out Ruby’s ability to group code with namespaces, and how it compares to PHP. Keep reading to check out how versatile Ruby is.
Continue Reading… Continuing from my last post about RVM, this time we’ll install Rails. Again, this series attempts to give you a bit of a deeper dive into getting started with Rails, so we will go through some of the options available when first creating your world-changing Rails application, as well as the gems that are installed along with Rails.
Continue Reading… This is my last post in the Code Safari series here on Ruby Source. I have really enjoyed writing it and trying out a new format which I hope you have found useful. For my concluding article, I want to leave you…
Continue Reading… This post marks the first in a series to help you start from nothing and end with a Rails application. Although there are many posts/series on this subject, I feel like basic Rails tutorials, especially in the wake of Rails 3.1 changes,…
Continue Reading… Last week I came across an excellent presentation from the Scotland Ruby Conference: “Literary Criticism for the Idle Programmer” by Roland Swingler. It introduced me to a crazy little ruby script that allows you to write programs entirely in underscores! That’s a…
Continue Reading… Our resident PHP developer Mal Curtis looks at how you can dynamically alter the functionality of Ruby classes at runtime. Read on to learn about Monkey Patching.
Continue Reading… A few weeks ago, I wrote an article about splitting out work to be done into threads to improve performance of a URL checker. A commenter noted that the parallel gem could be used to achieve the same result, which got me…
Continue Reading…