Skip to content

Instantly share code, notes, and snippets.

@pointcom
Created January 8, 2018 10:27
# http://ruby-doc.org/core-2.5.0/Float.html#method-i-round
# Ruby >= 2.4
(2.5).round(half: :up)
=> 3
(2.5).round(half: :down)
=> 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment