J’ai longtemps cherché !
Object.const_get("Array") #=> Array
Bonjour à tous,
Ce blog est davantage un carnet de notes qu’une vitrine personnelle. C’est sec et bref ! :p
(z ||= []) << 'test' équivaut à : z.nil? ? z = ['test'] : z << 'test'
EventMachine is a framework for network and concurrent programming, based on the Reactor design pattern. The Reactor pattern describes a service handler that receives events and dispatches them to registered event handlers. The benefits of the reactor pattern are a clear separation between the event dispatching and the application logic that handles the events, without complicating the code with multithreading.(source : http://www.infoq.com/news/2008/06/eventmachine )