class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment

Handles calculation of deltas for `kwsplat` nodes. This is a special case that just ensures the kwsplat is aligned with the rest of the hash since a `kwsplat` does not have a key, separator or value.

Public Instance Methods

deltas(first_pair, current_pair) click to toggle source
# File lib/rubocop/cop/mixin/hash_alignment_styles.rb, line 146
def deltas(first_pair, current_pair)
  if Util.begins_its_line?(current_pair.source_range)
    { key: first_pair.key_delta(current_pair) }
  else
    {}
  end
end