Skip to content

Instantly share code, notes, and snippets.

@thechrisoshow
Created June 10, 2011 13:40
Show Gist options
  • Save thechrisoshow/1018840 to your computer and use it in GitHub Desktop.
Save thechrisoshow/1018840 to your computer and use it in GitHub Desktop.
provides list of dimensions
def dimensions
dimensions = []
dimensions << height if height
dimensions << width if width
dimensions << depth if depth
dimensions.join(" x ")
end
@thechrisoshow
Copy link
Author

def dimensions
[height, width, depth].compact.join(" x")
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment