Object
Handles calculation of deltas (deviations from correct alignment) when the enforced style is 'key'.
# File lib/rubocop/cop/style/align_hash.rb, line 13 def checkable_layout(_node) true end
# File lib/rubocop/cop/style/align_hash.rb, line 21 def deltas(first_pair, prev_pair, current_pair) if current_pair.loc.line == prev_pair.loc.line {} else { key: first_pair.loc.column - current_pair.loc.column } end end
# File lib/rubocop/cop/style/align_hash.rb, line 17 def deltas_for_first_pair(*) {} # The first pair is always considered correct. end
[Validate]
Generated with the Darkfish Rdoc Generator 2.