1
2
3
4
module Keys_to_Meths
  def method_missing(meth, *args)
    if meth.to_s[-1] == 61 #if last char is an equal sign
...

Ruby Hash.keys_to_attr

by Ryguy, June 12, 2008 04:05, 3 refactorings, tagged with hash, methods

/no comment/

>_>

Ba665f86f90a1982af7b9c857418fcdb Talk
1
2
3
4
require 'net/http'
require 'rubygems'
require 'xmlsimple'
...

Ruby Parsing XML from a Web Service

by mwilliams, May 17, 2008 21:10, 3 refactorings, tagged with ruby, hash, xml, web, service

I'm working with a web serv...

4236ea6b84f4899b469e8edff4bf6d22 Talk
1
2
3
4
require 'erb'

# GOAL: render the template with the following vars
...

Ruby Given a hash of variables, ...

by mislav, April 12, 2008 15:12, 3 refactorings, tagged with erb, singleton, metaclass, metaprogramming, hash, render

This works. Now, is there a...

8f93a872e399bc1353cc8d4e791d5401 Talk
1
2
3
4
class Hash
  def fetch_all(key)
    results = []
...

Ruby Recursive Hash#fetch

by Neo, March 12, 2008 14:05, 1 refactoring, tagged with nested hash, hash, fetch

I wanted a Hash#fetch that ...

E64b3f6a4b0bde29f654eca45fcbb20f Talk
1
2
3
4
<table class="charge">
  <tr>
    <td colspan="100%" class="mainHeader"><%=@label.label%></td>
...

Ruby Iterating through a nested ...

by mwilliams, January 31, 2008 18:21, 2 refactorings, tagged with rails, view, table, hash, nested hash, iterator, iterate, ruby, Ruby on Rails

Good afternoon. I have a n...

4236ea6b84f4899b469e8edff4bf6d22 Talk