Monday, March 31, 2014

Changes 3/31/14

Ruby:

  • Worked more on classes
  • Learned about @@var class-wide variable, which stays constant across all instances
  • Saw that there was a global variable $var, but couldn't figure out how to use it
  • Learned about attr_accessor, attr_reader, and self.var
  • Learned about custom setter methods with def var=(arg), which allows you to modify a value before setting it.  In java this was always annoying to deal with.

1 comment:

  1. You appear to be getting your head around Ruby in short order. Excellent.

    ReplyDelete