Method: CDK::SCALE#limitCurrentValue
- Defined in:
- lib/cdk/components/scale.rb
#limitCurrentValue ⇒ Object
Check if the value lies outsid the low/high range. If so, force it in.
166 167 168 169 170 171 172 173 174 |
# File 'lib/cdk/components/scale.rb', line 166 def limitCurrentValue if @current < @low @current = @low CDK.Beep elsif @current > @high @current = @high CDK.Beep end end |