Sha256: db3fc894dc641d33e1fbe2a747ab0b09050ef50293f4d43fbdb9a1637c843707
Contents?: true
Size: 715 Bytes
Versions: 7
Compression:
Stored size: 715 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # Methods that calculate and return `Parser::Source::Ranges`. # @api private module ArgumentRangeHelper include RangeHelp private 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 def all_arguments_range(node) first_argument = node.first_argument last_argument = node.arguments.last range_between(first_argument.source_range.begin_pos, last_argument.source_range.end_pos) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems