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