Dependency Inversion Principle Discussion
Thanks for the eposide.
I don't understand why there is a need to say Server.new(provider: :digitalocean) (last line in code)
Shouldn't the provider be encoded only by the object passed to the perform method ?
So in here I see you're passing the Server::Create object an argument with the provider, which is something it already has (since it's in the server, and the Server::Create object knows the server).
This creates the possibility that someone might eventually try to call #perform(:linode) on an instance that has a :digital_ocean as the server.
Do you think we should depend on documentation and testing in these cases?
If I have a passing test verifying this case is correctly handled, I think it'd be OK.