H
henon
hi,
i want to do the following:
replace the occurrances of an access of a hash (namely widgets) by an
access to a instance variable in a piece of ruby code:
example:
"
widgets['button1'].text='hello'
widgets['textfield2'].text='hi'
aHash['aString']='aValue'
aHash['annother']='aValue'
"
should be replaced by
"
@button1.text='hello'
@textfield2.text='hi'
aHash['aString']='aValue'
aHash['annother']='aValue'
"
using gsub.
could you guys give me a hint how to do this?
thanks,
-- henon
i want to do the following:
replace the occurrances of an access of a hash (namely widgets) by an
access to a instance variable in a piece of ruby code:
example:
"
widgets['button1'].text='hello'
widgets['textfield2'].text='hi'
aHash['aString']='aValue'
aHash['annother']='aValue'
"
should be replaced by
"
@button1.text='hello'
@textfield2.text='hi'
aHash['aString']='aValue'
aHash['annother']='aValue'
"
using gsub.
could you guys give me a hint how to do this?
thanks,
-- henon