On Monday, December 29, 2003, 9:16:48 PM, Simon wrote:

> At several occasions I wonder how to best indent Ruby code.
> I am curious to how _you_ indent Ruby code ?

> For instance converting Array into variables, with
> many/long variables it can get unreadable.

> ( node, 
>   @input, 
>   @parent_nodes, 
>   @registers    ) = @resume_stack.pop   

I would tend to encapsulate the four values in an object rather than
splatter assignments all over the place.

> Classes which has to be initialized with a bunch of
> arguments: 

> def initialize(
>   number_of_registers, 
>   input, 
>   integrity_iterator=nil)

def initialize(nregisters, input, integrity_iterator=nil)

That's not too long :)  Any longer and I'd consider an alternative
strategy.

Regarding your actual indenting, though, I would do it the same way.

Gavin