123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::Cop::Offense::PseudoSourceRange

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: lib/rubocop/cop/offense.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#begin_pos (rw)

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 63

PseudoSourceRange = Struct.new(:line, :column, :source_line, :begin_pos,
:end_pos)

#column (rw) Also known as: #last_column

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 63

PseudoSourceRange = Struct.new(:line, :column, :source_line, :begin_pos,
:end_pos)

#end_pos (rw)

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 63

PseudoSourceRange = Struct.new(:line, :column, :source_line, :begin_pos,
:end_pos)

#first_line (readonly)

Alias for #line.

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 65

alias_method :first_line, :line

#last_column (readonly)

Alias for #column.

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 67

alias_method :last_column, :column

#last_line (readonly)

Alias for #line.

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 66

alias_method :last_line, :line

#line (rw) Also known as: #first_line, #last_line

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 63

PseudoSourceRange = Struct.new(:line, :column, :source_line, :begin_pos,
:end_pos)

#source_line (rw)

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 63

PseudoSourceRange = Struct.new(:line, :column, :source_line, :begin_pos,
:end_pos)

Instance Method Details

#column_range

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 69

def column_range
  column...last_column
end

#length

Alias for #size.

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 76

alias_method :length, :size

#size Also known as: #length

[ GitHub ]

  
# File 'lib/rubocop/cop/offense.rb', line 73

def size
  end_pos - begin_pos
end