From: Trans Date: 2005-12-07T15:32:35+09:00 Subject: Re: Are my metaprogramming underpants showing? Sorry I didn't get to this until this evening. Hope it's helpful. -T. require 'calibre/functor' module Flickr extend self @@api = {} def method_missing( sym , *args ) @@api[sym] ||= Functor.new { |op, *args| api_call("#{sym}.#{op}", *args ) } end def api_call( method, *args ) puts "call: http://flickr.com/services/rest/?method='#{method}'" puts "with parameters:" p args end end Flickr.test.echo("api_key" => "something long", "foo" => "bar")