Sign up Login
home | you | technology | web 2.0 | podcasts | entertainment | photos | comics | videos
 
Latest from concentration studios - Home
 

12 Days of Stupid Ruby Tricks

Wednesday, December 20, 2006

The Stupid Ruby Tricks wiki has come along nicely since I started it a while ago. This blog post is going to highlight some of the tricks that are not so stupid after all.

Day 1: Hash To Struct!

Sometime you have a Hash, and you would love that data in a Struct. Why not just run this method?
1
2
3
4
5
6
7
8
9
10
11
12
13
14

class Hash
  def to_struct(klass)
    Object.const_se...

Original article from http://concentrationstudios.com/2006/12/20/12-days-of-stupid-ruby-tricks
Login to read full articles and enjoy our free features for members.
« IDEs, Text Editors, and Bears, Oh My!
Ruport! »
 

Related articles