lib/spnet/limiters/range_limiter.rb
def apply_limit value, current_value = nil
    new_value = @lower.apply_limit value
    if(new_value == value)
      # value is OK so far. Make sure the right (upper) limit is OK too.
      new_value = @upper.apply_limit value
    end
    return new_value
  end
# Limit the given value to be between lower and upper limits. Ignores the current_value parameter.  
Limit the given value to be between lower and upper limits. Ignores the current_value parameter.
Limit the given value to be between lower and upper limits . Ignores the current_value parameter .
def apply_limit value, current_value = nil
    new_value = @lower.apply_limit value
    if(new_value == value)
      new_value = @upper.apply_limit value
    end
    return new_value
  end
def apply_limit value , current_value = nil new_value = @lower . apply_limit value if ( new_value == value ) new_value = @upper . apply_limit value end return new_value end
Limit the given value to be between lower and upper limits.
Limit the given value to be between lower and upper limits .
# value is OK so far. Make sure the right (upper) limit is OK too.
value
current_value