Class: Range

Inherits:
Object show all
Defined in:
lib/vex/base/range_ext.rb

Defined Under Namespace

Modules: Etest

Instance Method Summary collapse

Instance Method Details

#limit(value) ⇒ Object



2
3
4
5
6
7
# File 'lib/vex/base/range_ext.rb', line 2

def limit(value)
  if value < first then first
  elsif value > last then last
  else value
  end
end