Hello,
I am a newbie to Ruby. I have a nested hash converted to openstruct
(primarily for ease of access).

PreProduction
     webServers
        webServer1
        webServer2
     appServers
        appServer1
        appServer2 etc.,
I have the following global variables
$RCProperties -> openstruct
$RCPREPROD -> 'PreProduction'
$RCWEBSERVER -> 'webServers'

If I invoke it with $RCProperties.PreProduction.webServers things work
as expected. However when I try to invoke using
$RCProperties.$RCPREPROD.$RCWEBSERVERS ...I am getting syntax error.
Do I need to negate the . using regular expression? If yes, I tried
using $RCProperties\.$RCPreprod\.$RCWEBSERVERS but still getting the
same error message.
Any help would be highly appreciated.

Thanks
Pugal

-- 
Posted via http://www.ruby-forum.com/.