ruby ruminations – singleton class

some call it singleton class, some metaclass or even eigenclass.
in this blog entry i will give some explanation about the concept of singleton class (which i will call it during this post) and some (more or less useful) examples of its application. Read the rest of this entry »

Posted in ruby. 9 Comments »

ruby ruminations – composing Procs

last week i had some time to play around with ruby again. in order to get deeper into it, i startet to study some foreign ruby code. amongst others, i found some very interesting libraries called ruby facets. having a look at some of their implementations caused some headache at first, but on the other side gave some motivation to understand what’s happening and why it’s happening in a certain way. risking a second look and having some ruminations about that code maybe gets me just a little step nearer to the white side of the force … Read the rest of this entry »

Posted in ruby. 5 Comments »

ruby metaprogramming I

just played a little with some basic groundwork of ruby’s potentials upon metaprogramming. metaprogramming still is and even will become more important in regard to the increasing relevance due to domain specific languages (dsl). in the context of modeling such a dsl and expressing domain specific concepts within it, metaprogramming is a powerful and very flexible option, since it will provide the full power of ruby’s features when it comes to modeling domain concepts. Read the rest of this entry »

Posted in ruby. 7 Comments »