Our Publications
About Us
Josh Software
Our passion is Ruby On Rails! We are an Indian company who believes that programming is an art.Our portfolio! -- Contact Us
Categories
- Case Studies (1)
- CMS (9)
- Radiant (9)
- General (24)
- Javascript (5)
- Mobile Development (1)
- Sencha (1)
- MongoDB (2)
- Ruby (45)
- Ruby on Rails (117)
- Conferences (14)
- Search (8)
- Tutorials (12)
Authors
Tag Archives: RubyLearning
Online ruby Programming useful website links
1. Ruby http://tryruby.org2. Hpricot http://hpricot.com3. Regular expressions http://rubular.com4. Exceptions http://hoptoadapp.com/5. Application Performance http://newrelic.com6. Ruby Doc http://www.ruby-doc.org/7. Rails API http://api.rubyonrails.org/8. Ruby gems sources http://rubyforge.org / http://gems.github.com / http://gemcutter.org9. Listing remote gems from source gem list –remote –source http://gems.github.com10. List of Rails Plugins http://wiki.rubyonrails.org/rails/pages/Pluginshttp://www.agilewebdevelopment.com/plugins
Dynamic creation of variables in ruby
1. To create local variables in ruby dynamically. Use eval method in ruby ree-1.8.7-2010.01 > eval(“local=4″) => 4 ree-1.8.7-2010.01 > p local 4 ree-1.8.7-2010.01 > eval(“local_#{1}=4″) => 4 ree-1.8.7-2010.01 > puts local_1 4 2. To create & get instance variables … Continue reading
Eval method in ruby
Eval method in ruby executes string/expression passed as parameter. Example: ree-1.8.7-2010.01 > eval(“5+3″) => 8 ree-1.8.7-2010.01 > eval(“a=5″) => 5 ree-1.8.7-2010.01 > eval(“b||=a”) => 5 Its part of ruby meta-programming and not recommended approach unless there is no any alternative to do.
