Class: RubocopTodoCorrector::RubocopTodoParser

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop_todo_corrector/rubocop_todo_parser.rb

Constant Summary collapse

COP_NAME_LINE_REGEXP =
%r{
  ^
  (?<cop_name>
    \w+
    (?:/\w+)*
  )
  :
  $
}x

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:) ⇒ RubocopTodoParser

Returns a new instance of RubocopTodoParser.



24
25
26
# File 'lib/rubocop_todo_corrector/rubocop_todo_parser.rb', line 24

def initialize(content:)
  @content = content
end

Class Method Details

.call(content:) ⇒ Object

Parameters:

  • content (String)


17
18
19
20
21
# File 'lib/rubocop_todo_corrector/rubocop_todo_parser.rb', line 17

def call(content:)
  new(
    content:
  ).call
end

Instance Method Details

#callHash

Returns:

  • (Hash)


29
30
31
# File 'lib/rubocop_todo_corrector/rubocop_todo_parser.rb', line 29

def call
  { cops: }
end