Module: Evilution::Reporter::Suggestion::DiffHelpers Private

Defined in:
lib/evilution/reporter/suggestion/diff_helpers.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.parse_method_name(subject_name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/evilution/reporter/suggestion/diff_helpers.rb', line 8

def parse_method_name(subject_name)
  subject_name.split(/[#.]/).last
end

.sanitize_method_name(name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
# File 'lib/evilution/reporter/suggestion/diff_helpers.rb', line 12

def sanitize_method_name(name)
  name.gsub(/[^a-zA-Z0-9_]/, "_").gsub(/_+/, "_").gsub(/\A_|_\z/, "")
end