Created
June 10, 2011 13:40
-
-
Save thechrisoshow/1018840 to your computer and use it in GitHub Desktop.
provides list of dimensions
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
def dimensions | |
dimensions = [] | |
dimensions << height if height | |
dimensions << width if width | |
dimensions << depth if depth | |
dimensions.join(" x ") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
def dimensions
[height, width, depth].compact.join(" x")
end