Class: RubyCritic::SourceControlSystem::Git::Renames

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycritic/source_control_systems/git/churn.rb

Instance Method Summary collapse

Constructor Details

#initializeRenames

Returns a new instance of Renames.


9
10
11
# File 'lib/rubycritic/source_control_systems/git/churn.rb', line 9

def initialize
  @data = {}
end

Instance Method Details

#current(name) ⇒ Object


18
19
20
# File 'lib/rubycritic/source_control_systems/git/churn.rb', line 18

def current(name)
  @data.fetch(name, name)
end

#renamed(from, to) ⇒ Object


13
14
15
16
# File 'lib/rubycritic/source_control_systems/git/churn.rb', line 13

def renamed(from, to)
  current = current(to)
  @data[from] = current
end