Last active
November 18, 2019 16:18
-
-
Save Naomi-Dennis/d56c3dc71071cb144ed561c68255f3c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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