- Understand that class method belongs to a class object
- Understand how class methods are used in the Builder pattern
- Understand how class methods are used to persist information
- Understand why class methods should not be overused
- Investigate object properties of classes in
pry
; - Read through
team.rb
. Understand the usage of the class method as Builder; - Implement
build
method in theTeam
class to build a team from a list of players. The method should validate passed arguments: a roller derby team should have a jammer and 4 blockers one of whom is a pivot; - Refactor the
Team
class to store team name in a class method;
- "Design Patterns", Chapter 3, Builder
- "Design Patterns in Ruby", Chapter 14
- This blog post
These two chapters cover the Builder pattern, but not in relation to class methods.