[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Repeated parameter in the INI file

Deepu

5/2/2008 10:26:00 AM

Hi all,

I, trying to make a configuration file system with ruby.
In the configuration file the same parameter may appear multiple
times. This is allowed and how to handle such a situation with ini
library.
The present INI library i'm using returns the output as a hash. But in
a hash there can be no duplication of keys.


my idea is to support ini files as given below:

[conf1]
data=p1
time=12:23:22
data=p2
time=23:12:23
...
.
.
.
Thanks in advance,
Deepu D
1 Answer

Robert Klemme

5/5/2008 8:02:00 AM

0

2008/5/2 Deepu <agnibhu@gmail.com>:
> Hi all,
>
> I, trying to make a configuration file system with ruby.
> In the configuration file the same parameter may appear multiple
> times. This is allowed and how to handle such a situation with ini
> library.
> The present INI library i'm using returns the output as a hash. But in
> a hash there can be no duplication of keys.
>
>
> my idea is to support ini files as given below:
>
> [conf1]
> data=p1
> time=12:23:22
> data=p2
> time=23:12:23
> ..
> .
> .
> .
> Thanks in advance,
> Deepu D

Now, what was the question again? Was there any? I cannot find one.

robert

--
use.inject do |as, often| as.you_can - without end