DiscoverGoRails ScreencastsLimiting & Clamping Values in Ruby
Limiting & Clamping Values in Ruby

Limiting & Clamping Values in Ruby

Update: 2024-05-27
Share

Description

Sometimes you need user input to be restricted to a certain range or limited like "greater than zero". While you can do this with conditionals, there are some useful tricks to do this better in Ruby.
Comments 
loading
00:00
00:00
1.0x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

Limiting & Clamping Values in Ruby

Limiting & Clamping Values in Ruby

Chris Oliver