From: Ryan Davis Date: 2009-08-31T16:47:10+09:00 Subject: Re: What is the ruby conventions to name private method? On Aug 30, 2009, at 23:48 , pierr wrote: > What would you name the private method _insert in below situation? > > Class Binary_search_tree > > def insert node > _insert @root, node > end > > private > def _insert tree, node > #.... > end > > > end My conventions applied to your code: > class BinarySearchTree > def insert node > # ... > end > end 1) Don't use underscores in class names. 2) Don't have extra empty lines for no reason. 3) Use 2 spaces per indent. 4) Don't have private methods if you don't need them. 5) You don't need them. No, really.