RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

netghost — 17 posts

http://endofline.wordpress.com

The Strange Ruby Splat  endofline.wordpress.com
Is your code too readable? Do your co-workers complain that it always makes sense? The check out ruby's splat operator. Actually it's pretty neat, I cover some useful and some questionable uses for it.
Come take a look at how ruby implements the proxy pattern with Delegator with me in another part of my ongoing series covering the ruby standard library. You'll get to see the canonical use of method_missing, and a neat trick concurrency trick as well.
It's time for another look at ruby's standard library. This time we learn about the uses and implementation of ruby's WeakRef. If you find yourself tracking down memory leaks, this might just be what you're looking for.
Today I have another installment in my series on the ruby standard library. We take a look at how timeout works and what to use it for. If you haven't looked at Timeout's source, you might be surprised at how simple it really is.
I just finished up a fairly large update to Qwandry, a tool for quickly opening libraries, projects, and packages. For all you polyglot programmers you can now easily use Qwandry to launch your ruby libraries and gems, perl, python, and node libraries as well.

Go forth and qw qw
We continue our exploration of ruby's standard library by looking at how Pathname works, and what we can learn from it.
Once again, I walk through an often ignored part of ruby's standard library. This time around, we look at how Abbrev works and what it does.
Here are some handy Hash tricks that take advantage of Hash's initialization block.
We will take a look at ruby's TSort which allows us to untangle dependencies and do some interesting graph processing. Well worth a look if you have never heard of TSort since you already have it installed.
Take a look at ruby's MiniTest::Mock with me. We will see what the mocking library built into ruby 1.9 looks like, and most importantly, how it works.
Come along with me as I take a walk through Shellwords, an interesting part of the standard library that often gets overlooked.
There's been a bit of chatter about ruby's standard library lately, so I thought I might write about some of the more interesting parts. First off, lets have a look at minitest.
Qwandry is a little tool for quickly opening all those gems, files in ruby's standard lib, etc. from the command line. Is ruby's Date.parse doing something weird? `qw date`. You can also tell it about other languages, and package locations if perhaps you want to use it with Node.js and npm or any other file repository. I also wrote up a little bit more about the motivation for Qwandry, if you're interested.
RubyScope, ruby colored binoculars  endofline.wordpress.com
First release of RubyScope a tool for doing syntactic queries against your ruby code. Find out where variables are being assigned, classes and methods are defined, and more. A TextMate plugin is coming soon.
SexpPath is a library that defines a neat DSL for pattern matching against S-Expressions, for instance the ruby Abstract Syntax Tree. Kind of like XPath or Regular Expressions for your code.
Just thought folks might be interested in OpenGem. It's a little ruby gem plugin that lets you type in: gem open rails and open it up right in your editor. If you're curious about writing a plugin for ruby gems it's probably a decent starting place.
Check out rubydiff , it's a neat tool for doing high-level diffs on ruby code. I have a longer post about it as well with some examples.