Sha256: b79bd6f404c133ab8387261cdba108687a8e6e6ec37f039da7e487c786034ec6

Contents?: true

Size: 318 Bytes

Versions: 177

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

177 entries across 172 versions & 17 rubygems

Version Path
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
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/rubocop-1.57.2/lib/rubocop/ext/range.rb
rubocop-1.63.1 lib/rubocop/ext/range.rb
rubocop-1.63.0 lib/rubocop/ext/range.rb
bison-0.1.0 vendor/bundle/ruby/3.2.0/gems/rubocop-1.62.1/lib/rubocop/ext/range.rb
rubocop-1.62.1 lib/rubocop/ext/range.rb