Conversation
| end | ||
|
|
||
| def dead? | ||
| !self.alive |
There was a problem hiding this comment.
You are consistently using the self.attribute for setting/changing values and just the bare attribute for reading values, except this one reader. Maybe change this one to !alive?
There was a problem hiding this comment.
@mikegee what's your preference for defining attributes? ivars or using self as done here? And why? :D
There was a problem hiding this comment.
I prefer defining the attribute methods and using them exclusively. Instance variables with typos raise no error, Ruby happily returns nil. Method calls with typos raise NoMethodError. I prefer feedback as early as possible.
There was a problem hiding this comment.
On this particular line, I suggest removing the self. prefix but continuing to call the reader method.
|
Looks great! |
@jaybobo Last one!