Skip to content

Instantly share code, notes, and snippets.

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