How to think in Ruby way

I'm new with developping with Ruby, When i deal with a problem ,always
manage it in C and then translate into Ruby.i always feel bad about it. now
i've got a task ,could you tell me how could manage it in Ruby way.
the task as followes:
here is a sample file contain some section of text like:

PARANAME=SMS
PARASTATUS=D2++R
PARACOUNT=2
PARAHEAD=mod-telsvr:
PARACMDNAME=DN
PARACMDVALUE=mdn=
PARACMDNAME=,smmopp=true
PARACMDVALUE=,smmtpp=true

it's a switcher command parser's configure file(a MS ini file)

and i want to translate it to the result like:
SMS+D++R=mod-telsvr:mdn=${DN},smmopp=true,smmtpp=true

steps as followes:
result=value of PARANAME + '+' + value of PARASTATUS + value of PARAHEAD
(all the variables are dealed as strings)
and then:
if the value of the string PARACMDNAME's in upper case,
result += PARACMDVALUE + ${PARACMDNAME}
otherwise,in lower case
result += PARACMDNAME + PARACMDVALUE

here is the original test file i wanna cope with:

PARANAME6=SMS
PARASTATUS6=D2++E
PARACOUNT6=2
PARAHEAD6=mod-telsvr:
PARACMDNAME60=DN
PARACMDVALUE60=mdn=
PARACMDNAME61=,smmopp=false
PARACMDVALUE61=,smmtpp=false

PARANAME7=ROAMING
PARASTATUS7=D0++R
PARACOUNT7=2
PARAHEAD7=mod-vlrlist:
PARACMDNAME70=DN
PARACMDVALUE70=mdn=
PARACMDNAME71=,roamflag=2
PARACMDVALUE71=,tempno=1

PARANAME8=ROAMING
PARASTATUS8=D0++E
PARACOUNT8=2
PARAHEAD8=mod-vlrlist:
PARACMDNAME80=DN
PARACMDVALUE80=mdn=
PARACMDNAME81=,roamflag=2

thanks

leo

"H.J.LeoChen" <hjleochen@hotmail.com> schrieb im Newsbeitrag
news:cffhr1$58e$1@news.yaako.com...

I'm new with developping with Ruby, When i deal with a problem ,always
manage it in C and then translate into Ruby.i always feel bad about it.

now

i've got a task ,could you tell me how could manage it in Ruby way.
the task as followes:

IMHO there's not much to thinking this the Ruby Way(TM):

- parse values while reading the file
   into an appropriate data structure
   (Hash of Hashes comes to mind)

- iterate all configs and construct result strings

- process strings (output or whatever).

Regards

    robert