Sha256: b79bd6f404c133ab8387261cdba108687a8e6e6ec37f039da7e487c786034ec6

Contents?: true

Size: 318 Bytes

Versions: 182

Compression:

Stored size: 318 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Ext
    # Extensions to Parser::Source::Range
    module Range
      # Adds `Range#single_line?` to parallel `Node#single_line?`
      def single_line?
        first_line == last_line
      end
    end
  end
end

Parser::Source::Range.include RuboCop::Ext::Range

Version data entries

182 entries across 177 versions & 18 rubygems

Version Path
rubocop-1.70.0 lib/rubocop/ext/range.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/rubocop-1.64.1/lib/rubocop/ext/range.rb
rubocop-1.69.2 lib/rubocop/ext/range.rb
rubocop-1.69.1 lib/rubocop/ext/range.rb
rubocop-1.69.0 lib/rubocop/ext/range.rb
rubocop-1.68.0 lib/rubocop/ext/range.rb
rubocop-1.67.0 lib/rubocop/ext/range.rb
rubocop-1.66.1 lib/rubocop/ext/range.rb
rubocop-1.66.0 lib/rubocop/ext/range.rb
rubocop-1.65.1 lib/rubocop/ext/range.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/rubocop-1.64.1/lib/rubocop/ext/range.rb
rubocop-1.65.0 lib/rubocop/ext/range.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/rubocop-1.35.1/lib/rubocop/ext/range.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/rubocop-1.35.1/lib/rubocop/ext/range.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/rubocop-1.35.1/lib/rubocop/ext/range.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/rubocop-1.64.1/lib/rubocop/ext/range.rb
rubocop-1.64.1 lib/rubocop/ext/range.rb
rubocop-1.63.4 lib/rubocop/ext/range.rb
rubocop-1.63.3 lib/rubocop/ext/range.rb
rubocop-1.63.2 lib/rubocop/ext/range.rb