You can get a string like "WIDTHxHEIGHT" inside styles hash, for the giving object's style, using Paperclip::Style#geometry:
string = @user.attachment.styles[:size].geometry
Than you can split the string to have either height or width:
width = string.split("x")[0]
height = string.split("x")[1]