$this->phone; } public function getPhoneDdi() { return $this->phone->getDdi(); } public function getPhoneDdd() { return $this->phone->getDdd(); } public function getPhoneNumber() { return $this->phone->getNumber(); } }
$this->phone; } public function getPhoneDdi() { return $this->phone->getDdi(); } public function getPhoneDdd() { return $this->phone->getDdd(); } public function getPhoneNumber() { return $this->phone->getNumber(); } }
code code code end def publish(title, description, author) # code code code end def update(id, title, description, author) # code code code end end # Para isso Post = Struct.new(:title, :description, :author) class PostRepository def draft(post) # code code code end def publish(post) # code code code end def update(id, post) # code code code end end
Up Your Game! (https://www.youtube.com/watch?v=D4auWwMsEnY) - Smells to Refactoring Quick Reference Guide (http://www.industriallogic.com/wp- content/uploads/2005/09/smellstorefactorings.pdf)