Greg Benedict

Thoughts on the web and creativity.

Category: ruby

Get and Set Methods in Ruby

Ruby’s attr_accessor method is much cleaner and easier to write than other get/set methods, such as those in C#.

Random Numbers in Ruby

I was working on a project for Nexpointe and needed to grab a random number, 1-5 to rotate between images. It was much easier than expected. imageNum = rand(5) + 1 There’s no instantiation of objects. It doesn’t take 5 lines. It just does it. Ruby – It’s what I always wished ASP would be.

Playing With Mephisto

This has been a really intense afternoon. I got Mephisto up and running on a new CentOS 4.4 box I installed on our Virtual Server today. Well, sort of. The admin tool worked great, no issues at all. But the front end did not have a default page. If I went to preview a post [...]