<br><br><div><span class="gmail_quote">On 8/7/07, <b class="gmail_sendername">Pratik Naik</b> <<a href="mailto:pratik@thinkwares.com">pratik@thinkwares.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
How about<br><br>===<br>class Whatever<br><br>def with_roles=(roles)<br> self.roles << roles<br>end<br><br>end<br><br>Whatever.new :with_roles => Roles.find_default_roles<br>===</blockquote><div><br><br>or even this perhaps?
<br><br>===<br>class Whatever<br> def with_roles(roles=[default_role_1,default_role_2])<br> self.roles << roles <br> end<br>end<br><br>Whatever.new :with_roles<br>=== <br></div><br></div><br>