From: Gary Wright Date: 2011-02-25T04:17:39+09:00 Subject: Re: Suggestions for my ruby snippet so will not look like C anymore: method(method(param)) On Feb 24, 2011, at 1:27 PM, Costi G. wrote: > This in turn is called by: > build_report(customer, > connection.send_request(request_builder.build_request(customer))) > > Ugly! Any ideas on how to make it more expressive? Usually in ruby and > OOP we chain objects like this: "string".make_it_bigger.flash_it.send One approach might be to encapsulate the connection within the customer. customer = Customer.new(connection, other, args) or even customer = connection.create_customer(other, args) In either case, the customer is internally bound to the connection so that you can handle the queries internal to the customer object and just ask the customer object for the complete report: customer.report Gary Wright