Class: RubyCritic::SourceControlSystem::Git::Renames
- Inherits:
-
Object
- Object
- RubyCritic::SourceControlSystem::Git::Renames
- Defined in:
- lib/rubycritic/source_control_systems/git/churn.rb
Instance Method Summary collapse
- #current(name) ⇒ Object
-
#initialize ⇒ Renames
constructor
A new instance of Renames.
- #renamed(from, to) ⇒ Object
Constructor Details
#initialize ⇒ Renames
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 |