Remove unused differ methods
This commit is contained in:
parent
e5333b9980
commit
ea80020cb3
1 changed files with 13 additions and 23 deletions
|
@ -49,6 +49,19 @@ module Mutant
|
||||||
new(lines(old), lines(new))
|
new(lines(old), lines(new))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Break up source into lines
|
||||||
|
#
|
||||||
|
# @param [String] source
|
||||||
|
#
|
||||||
|
# @return [Array<String>]
|
||||||
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
def self.lines(source)
|
||||||
|
source.lines.map { |line| line.chomp }
|
||||||
|
end
|
||||||
|
private_class_method :lines
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# Return diffs
|
# Return diffs
|
||||||
|
@ -72,29 +85,6 @@ module Mutant
|
||||||
old.length > new.length ? old.length : new.length
|
old.length > new.length ? old.length : new.length
|
||||||
end
|
end
|
||||||
|
|
||||||
# Return length difference
|
|
||||||
#
|
|
||||||
# @return [Fixnum]
|
|
||||||
#
|
|
||||||
# @api private
|
|
||||||
#
|
|
||||||
def length_difference
|
|
||||||
new.size - old.size
|
|
||||||
end
|
|
||||||
|
|
||||||
# Break up source into lines
|
|
||||||
#
|
|
||||||
# @param [String] source
|
|
||||||
#
|
|
||||||
# @return [Array<String>]
|
|
||||||
#
|
|
||||||
# @api private
|
|
||||||
#
|
|
||||||
def self.lines(source)
|
|
||||||
source.lines.map { |line| line.chomp }
|
|
||||||
end
|
|
||||||
private_class_method :lines
|
|
||||||
|
|
||||||
# Return colorized diff line
|
# Return colorized diff line
|
||||||
#
|
#
|
||||||
# @param [String] line
|
# @param [String] line
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue