Online ruby Programming useful website links

1. Ruby http://tryruby.org2. Hpricot http://hpricot.com3. Regular expressions http://rubular.com4. Exceptions Application Performance http://newrelic.com6. Ruby Doc Rails API Ruby gems sources / / http://gemcutter.org9. Listing remote gems from source gem list --remote --source http://gems.github.com10. List of Rails Plugins

Dynamic creation of variables in ruby

1. To create local variables in ruby dynamically.Use eval method in rubyree-1.8.7-2010.01 > eval("local=4") => 4 ree-1.8.7-2010.01 > p local4ree-1.8.7-2010.01 > eval("local_#{1}=4") => 4 ree-1.8.7-2010.01 > puts local_142. To create & get instance variables dynamically in ruby.instance_varaiable_set & instance_varaiable_get methods are provided and no need to do it using eval.ree-1.8.7-2010.01 > (0..3).each do |i|ree-1.8.7-2010.01 >     instance_variable_set("@instance_#{i}", i*i+1)ree-1.8.7-2010.01 ?> … Continue reading Dynamic creation of variables in ruby