Chris Pietschmann

husband, father, hacker, entrepreneur, futurist, innovator, autodidact

NAVIGATION - SEARCH

Creating Ruby-like "Extensions" in JavaScript

I've been spending a little time here and there learning Ruby. I haven't dug much into Rails yet, but have mostly been just focusing on the Ruby language and what it has to offer. Ruby has some nice "helper" methods attached to it's base data types that make iterations and other simple operations even simpler. I've ported a couple of these methods over to JavaScript so I could play around with using some of these "Ruby-isms" with my favorite web-based, dynamic programming language. Below are so... [More]

Implementing Namespaces in Ruby using Nested Modules

Recently, I finally got around to starting to learn Ruby. I am finding it to be rather pleasant to program in. Now, one thing that I am used to using with an Object Oriented language (especially with my .NET background) are Namespaces. The only problem is that you can't just declare a namespace in Ruby using a "namespace" keyword. However, it's not difficult to implement Namespaces in Ruby, all you need to do is nest some modules. To demonstrate this, I'll show you how... [More]