On Fri, Feb 6, 2009 at 7:37 PM, DaVinci <[email protected]> wrote:
>
> I need to create new participant classes, but don“t see exactly where
> to put them. I seems that they may be in conf/participants.rb, but I
> think it can be very lazy and obfuscated when I need many new classes.
>
> What do you think about this? Could it be insteresting to define a
> more robust structure for defining new participants?

OK, it seems you are talking about ruote-rest...

IMHO you should add your participants implementation under
lib/participants/*.rb then register the participants in the engine via
conf/participants.rb (don't forget to
require('participants/filename.rb').

So for instance, if your participant DaVinciParticipant is located in
lib/participants/davinci_participant.rb you could have something like

---8<---
configure do

  require 'participants/davinci_participant'

  application.engine.register_participant :da1, DaVinciParticipant

  application.engine.register_participant :da2,
DaVinciParticipant.new(:employer => 'Francis the First')

  # ...

end
--->8---

lib/ for classes, conf/ for configuration.


Best regards,

-- 
John Mettraux   -   http://jmettraux.wordpress.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ruote (OpenWFEru) users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to