--------------080208000707050105060507
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Personally I think OO is convenient. Instance method dup or clone should be able to meet this kind of your requrements. 

Rgds,
Shiwei
(The views expressed are my own and not necessarily those of Oracle and its affiliates.)

Paul Lutus wrote:

>Vincent Fourmond wrote:
>
>  
>
>>Paul Lutus wrote:
>>    
>>
>>>My personal view is that you should create a class responsible for data
>>>handling and processing, and include methods capable of cloning some or
>>>all of the data members of one instance of the class to another. That
>>>way, you will have encapsulated the specifics of the data copying or
>>>processing within the class.
>>>      
>>>
>>  I agree that that would be the Ruby OO way. But, let's face it, for
>>small scripts, a script-like procedural approach is much faster and
>>easier to develop. For one, I discovered I would use another class just
>>about when I reached the line where it became necessary...
>>    
>>
>
>In your first post, you show an example of a copy from one class instance to
>another (or so it appears). That's why I suggested formalizing the process
>of copying within the class.
>
>It seems a class already exists, and you are copying select values from one
>instance to another. It just seemed a better approach to do this copying
>activity formally within the class itself.
>
>  
>

--------------080208000707050105060507--