Wednesday, May 14, 2014

struct

http://www.ruby-doc.org/core-2.1.1/Struct.html
A Struct is a convenient way to bundle a number of attributes together, using accessor methods, without having to write an explicit class. 
The Struct class generates new subclasses that hold a set of members and their values. For each member a reader and writer method is created similar to Module#attr_accessor.

No comments:

Post a Comment