You can use the #replace method to do that sort of thing:

    self.replace "Help! Oh, well, I'm saved!"

This method is defined in classes String, Hash, Array, and Set, and
works the same way in each one.

jeremy

On Wed, Aug 11, 2010 at 5:44 PM, Ralph Shnelvar <ralphs / dos32.com> wrote:
> I'm still not "getting it."
>
> Consider
>
> - - -
> class DirectoryString < String
>   >   >  
>
>   >  ⨯ܯ ܢ>  
>
>   
>  ⡨ܯܢ>  
>
>   
>  ܢ>  
>
>   >  𡨢ܢ
>  
>
>   >  ܢ
>  
>
>   
>  ??????? What do I do here ??????? ... The following is illegal
>  >  
> end
>
> - - -
>
>
> The only thing I can think of is converting from the standard IS_A (Inheritance) to a HAS_A (create a member variable).
>
> If I do the latter, above, I will have to create a ton of simple "forwarding" messages.
>
> What's the Ruby way of doing this sort of thing?