lib/rubocop/cop/style/align_hash.rb in rubocop-0.20.1 vs lib/rubocop/cop/style/align_hash.rb in rubocop-0.21.0
- old
+ new
@@ -13,11 +13,11 @@
class KeyAlignment
def checkable_layout(_node)
true
end
- def deltas_for_first_pair(*_)
+ def deltas_for_first_pair(*)
{} # The first pair is always considered correct.
end
def deltas(first_pair, prev_pair, current_pair)
if current_pair.loc.line == prev_pair.loc.line
@@ -33,11 +33,11 @@
class AlignmentOfValues
def checkable_layout(node)
!any_pairs_on_the_same_line?(node) && all_have_same_sparator?(node)
end
- def deltas(first_pair, prev_pair, current_pair)
+ def deltas(first_pair, _prev_pair, current_pair)
key_delta = key_delta(first_pair, current_pair)
current_separator = current_pair.loc.operator
separator_delta = separator_delta(first_pair, current_separator,
key_delta)
value_delta = value_delta(first_pair, current_pair) -
@@ -115,10 +115,10 @@
end
end
# Handles calculation of deltas when the enforced style is 'separator'.
class SeparatorAlignment < AlignmentOfValues
- def deltas_for_first_pair(first_pair, node)
+ def deltas_for_first_pair(*)
{} # The first pair is always considered correct.
end
private