310 Experience
3 Lessons Completed
0 Questions Solved


Posted in Single Responsibility Principle Discussion

I agree with you on the first point. Assuming Server::SSH class represents an SSH connection, the two other server classes are not really "types" of an SSH connection. So it's probably better to use a module to extract the common start_ssh behavior and then include that module in the server classes.

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.