Category Archives: ruby programming

A simple Ruby method to send email

scmuser created the topic: A simple Ruby method to send email A simple Ruby method to send email send_email “admnistrator@example.com”, :body => “This was easy to send” Source – jerodsanto.net/2009/02/a-simple-ruby-method-to-send-email/

What is the way to iterate through an array in Ruby?

scmuser created the topic: What is the way to iterate through an array in Ruby? What is the way to iterate through an array in Ruby? This will iterate through all the elements: This will iterate through all the elements giving you the value and the index: Source – stackoverflow.com/questions/310634/what-…ugh-an-array-in-ruby

Common ways to read a file in Ruby?

scmuser created the topic: Common ways to read a file in Ruby? It is also possible to explicitly close file after as above (pass a block to open closes it for you): Source – stackoverflow.com/questions/5545068/what…-read-a-file-in-ruby