Skip to content

Instantly share code, notes, and snippets.

@Naomi-Dennis
Last active November 18, 2019 16:18
Show Gist options
  • Save Naomi-Dennis/d56c3dc71071cb144ed561c68255f3c0 to your computer and use it in GitHub Desktop.
Save Naomi-Dennis/d56c3dc71071cb144ed561c68255f3c0 to your computer and use it in GitHub Desktop.
class Monitor
def initialize(videoConnector)
self.videoConnector = videoConnector;
end
def connectToDevice(device)
if videoConnector.kind_of? DisplayPortCord
videoConnector.connect(device);
elsif videoConnector.kind_of? HdmiCord
videoConnector.connectToSomething(device)
end
end
private
attr_accessor :videoConnector;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment