Sha256: 5801da62f11130cf724a58d0749339e30ef670ddd089dd811df37187368f48e9
Contents?: true
Size: 714 Bytes
Versions: 8
Compression:
Stored size: 714 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # Methods that calculate and return `Parser::Source::Ranges`. module ArgumentRangeHelper include RangeHelp private def first_argument_range(node) first_argument = node.first_argument range_between( first_argument.source_range.begin_pos, first_argument.source_range.end_pos ) end def first_and_second_arguments_range(node) first_argument = node.first_argument second_argument = node.arguments[1] range_between( first_argument.source_range.begin_pos, second_argument.source_range.end_pos ) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems