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
1 2 3 4
require 'net/http' require 'rubygems' require 'xmlsimple' ...
Ruby Parsing XML from a Web Service
I'm working with a web serv...
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...
1 2 3 4
class Hash def fetch_all(key) results = [] ...
Ruby Recursive Hash#fetch
I wanted a Hash#fetch that ...
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...
/no comment/
>_>