From: Robert Klemme Date: 2009-05-07T21:38:41+09:00 Subject: Re: modules and classes question 2009/5/6 Marcelo Barbudas : > >>> Something like: >>> conn = Main.new(user, pass) >>> conn.resources.method_from_resource_class_that_uses_main_for >>> the_actual_request_method >> >> Yes, or even >> >> Main.connect(user, pass) do |conn| >>  conn.resources.method_from_resource_class_that_uses_main_for >> the_actual_request_method >> end > > Right. How do write these classes though? > How would some really really basic Main, Resource classes look like? I'm lacking the time to go into this with more detail but maybe this blog posting helps you as a start. http://blog.rubybestpractices.com/posts/rklemme/002_Writing_Block_Methods.html Note especially the gist with the full code of the example mentioned at the end of the article. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/