On 19 Jul 2013, at 19:57, Peter Morris <[email protected]> wrote:
> isn't this exactly what object.send does? > > it sends a message (a method call) to one object? Well I think that's exactly the source of this problem :-) Ruby's Object#send and my SimpleMessageBus#send both use the same metaphor, but at a different level of abstraction. Without being able to name the protocols (object messaging and application domain messaging) it's impossible to know which one is meant by `bus.send(…)`. Naming MessageBus#send differently from Object#send now feels like a workaround for a limitation in Ruby. The only way I can see to allow both is to attempt to treat a message as a domain message, and if this fails, treat it as an object message and let the original, overridden method handle it. Incidentally this has made me realise there's a bug in my code, as I'm using method_missing somewhere and not updating the corresponding respond_to? accordingly, thanks for pointing this out :) Cheers Ash -- http://www.patchspace.co.uk/ http://www.linkedin.com/in/ashmoran -- You received this message because you are subscribed to the Google Groups "NWRUG" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nwrug-members. For more options, visit https://groups.google.com/groups/opt_out.
