Last active
November 5, 2017 18:00
-
-
Save soulcutter/3af3bf93353b1f4d61b8a07652d76132 to your computer and use it in GitHub Desktop.
Example of what object syntax could look like
This file contains hidden or 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
bathroom.urinals.occupied.select { |urinal| urinal.adjacent.select(&:occupied?).any? } | |
Urinal = Struct.new(:is_occupied, :location) { def adjacent_urinals; location.adjacent_urinals; end } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment