Skip to main content

Posts

Showing posts from April, 2013

Ruby Tutorial

 Ruby Installation with graphics (painful) ============================== * Install RVM for Ruby - \curl -#L https://get.rvm.io | bash -s stable --autolibs=3 --ruby * Install TK from ActiveTcl - http://www.activestate.com/activetcl * Run rvm reinstall 2.0.0 --enable-shared --enable-pthread --with-tk --with-tcl Recommended Sites ================== 1. From author (Yukihiro Matsumore) http://rubymonk.com/ 2. Basic http://www.tutorialspoint.com/ruby/ruby_variables.htm Interactive Tutorial ============== http://tryruby.org/ Run ruby ========= 1. Using interpreter irb ( start interpreter) load "fname.rb" ( load the file) ruby "fname.rb" ( run the file) 2. Using ruby command ruby "fname.rb" ( run the file) 3. Type of Variables & Mehod ==================== @instanceVariable   @@classVariable $GlobalVariable 4. instanceMethod def fnc ... end 5. ClassMethod ============= def self.fnc ... end 6. Ano