Following the article Keyword With I present here how I write a Module to be included an a class. It has to extend the class with class methods and instance methods.
Posts Tagged ‘metaprogramming’
Module structure
05.18
Tags: metaprogramming, module, module structure, Ruby
Posted in Ruby | No Comments »
Keyword With
05.18
Tags: Keyword, meta class, metaprogramming, with
Posted in Ruby | 1 Comment »
From other programming language I know a interesting feature; the ‘with’ keyword. It allows to write some code in the environment within the bindings of the passed object.
Ruby has myriad of ways of doing something and leaves you plenty of freedom to choose your style. I wanted a more readable coherent approach for such an important feature I use all the time.
To much meta will kill you
05.06
Tags: caffeine, coffee mug, cold cold night, flow, kill you, lyric, meta kill song, meta programming, metaprogramming, sensation, source code editor, sunshine
Posted in Hazardous, Ruby | No Comments »
This song is dedicated to all of you whose passion is to stay up all night coding. The coffee mug at hand, the beloved source code editor open; often a good dozen windows plastered around the desktop. And at last a nice song playing in the background. You are right into your element and the flow sensation is palpable.
Several hours later, your percolator is empty and without caffeine juice you start to hear strange words in your head that don’t match the actual lyric. In that cold cold night here is what I heard: