class RuboCop::Cop::Style::RandomWithOffset
def corrected_rand_modified(node)
def corrected_rand_modified(node) rand, method = *node prefix_node, _, random_node = *rand prefix = prefix_from_prefix_node(prefix_node) left_int, right_int = boundaries_from_random_node(random_node) if %i[succ next].include?(method) "#{prefix}(#{left_int + 1}..#{right_int + 1})" elsif method == :pred "#{prefix}(#{left_int - 1}..#{right_int - 1})" end end