Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.50 KB | None | 0 0
  1. def outboundweight
  2. result = weight
  3. return (0.25 + weight).ceil if size == :smallstandard && weight <= 1
  4.  
  5. dimweight = width * height * length / 166
  6. result = dimweight if dimweight > result
  7.  
  8. return (0.25 + result).ceil if size == :smallstandard && weight > 1
  9. (1 + result).ceil
  10. end
  11.  
  12. def realweight
  13. result = weight
  14. return result if size == :smallstandard
  15. return 1 if size == :largestandard && result <= 1
  16. dimweight = width * height * length / 166
  17. result = dimweight if dimweight > result
  18. result.ceil
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement