class Numeric
Public Instance Methods
clamp(range)
click to toggle source
# File lib/tfg/support/core_ext/numeric/clamp.rb, line 2 def clamp(range) if self < range.min range.min elsif self > range.max range.max else self end end