Hi,

Edgardo Hames wrote:
> Hi, everybody. I wondered how would you write a ResourceBundle-like
> class in Ruby. Basically, what I need is hash which is initialized by
> reading key,value pairs from a file. I've thought of this
> 
> class ResourceBundle < Hash
>   def initialize(fileName)
>     #load data from fileName
>   end
> end
> 
> What do you think of this approach?

Though I have not yet understood what you need clearly, when you are 
talking user defined Properties in Java instead of ResourceBundle, 
lib/soap/property.rb and test/soap/test_property.rb in ruby/1.8.* or 
ruby/1.9.* can be an implementation sample.

My implementation does not support parent-child property chaining of 
ResourceBundle.  Robert's one is clearly demonstrating the concept (and 
already enough useful).

Regards,
// NaHi