Module: RuboCop::Ext::Range

Defined in:
lib/rubocop/ext/range.rb

Overview

Extensions to Parser::Source::Range

Instance Method Summary collapse

Instance Method Details

#single_line?Boolean

Adds ‘Range#single_line?` to parallel `Node#single_line?`

Returns:

  • (Boolean)


8
9
10
# File 'lib/rubocop/ext/range.rb', line 8

def single_line?
  first_line == last_line
end