The Ruby on Rails and ClojureScript experts

Sep 3, 2012

Neat trick about using Ruby Struct for simple domain concepts:

Point =, :y)
origin = Point(0,0) returns a class, which we assign to the Point constant. Very cool. We just created a simple class with constructor and two accessors (x and y).

Link: Random Ruby Tricks: – Literate Programming via