module RuboCop::Cop::ArgumentRangeHelper
Methods that calculate and return `Parser::Source::Ranges`.
Private Instance Methods
all_arguments_range(node)
click to toggle source
# File lib/rubocop/cop/mixin/argument_range_helper.rb, line 30 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
first_and_second_arguments_range(node)
click to toggle source
# File lib/rubocop/cop/mixin/argument_range_helper.rb, line 20 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
first_argument_range(node)
click to toggle source
# File lib/rubocop/cop/mixin/argument_range_helper.rb, line 11 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