Class: Avm::EacRubyBase1::Rubocop::OffenseSet::Offense

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/eac_ruby_base1/rubocop/offense_set/offense.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.by_data(data) ⇒ Object



9
10
11
# File 'lib/avm/eac_ruby_base1/rubocop/offense_set/offense.rb', line 9

def by_data(data)
  new(data)
end

Instance Method Details

#cop_nameString

Returns:

  • (String)


17
18
19
# File 'lib/avm/eac_ruby_base1/rubocop/offense_set/offense.rb', line 17

def cop_name
  data.fetch('cop_name')
end

#line_indexInteger

Returns:

  • (Integer)


22
23
24
# File 'lib/avm/eac_ruby_base1/rubocop/offense_set/offense.rb', line 22

def line_index
  line_number - 1
end

#line_numberInteger

Returns:

  • (Integer)


27
28
29
# File 'lib/avm/eac_ruby_base1/rubocop/offense_set/offense.rb', line 27

def line_number
  data.fetch('location').fetch('line')
end