Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Method chaining and lazy evaluation in Ruby

Method chaining has been all the rage lately and every database wrapper or aything else that’s uses queries seems to be doing it. But, how does it work? To figure that out, we’ll write a library that can chain method calls to build up a MongoDB query in this article. Let’s get started!Oh, and don’t worry if you haven’t used MongoDB before, I’m just using it as an example to query on. If you’re using this guide to build a querying library for something else, the MongoDB part should be easy to swap out.Let’s say we’re working with a...

3,112 0       RUBY IMPLEMENTATION METHOD CHAINING LAZY EVALUATION