Matt Williams
Posts: 466
Nickname: aetherical
Registered: Feb, 2008
|
Matt Williams is a jack-of-all trades living in Columbus, OH.
|
|
|
|
Default values for Attributes
|
Posted: Sep 1, 2009 1:21 PM
|
|
|
This post originated from an RSS feed registered with Ruby Buzz
by Matt Williams.
|
Original Post: Default values for Attributes
Feed Title: Ruby Blender
Feed URL: http://feeds2.feedburner.com/RubyBlender
Feed Description: This blog contains short-ish ruby tips, hints, and techniques.
|
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Matt Williams
Latest Posts From Ruby Blender
|
|
This is the first in a series of entries which I’m pulling over articles from an old blog, revising, etc…
The Problem
One of the neat things about Ruby is it’s ability to create accessor methods for you, by simply declaring attr_reader, attr_writer, or attr_accessor. However, there’s not an easy way to define a default value for [...]
Read: Default values for Attributes
|
|