class RuboCop::Cop::HashAlignment::TableAlignment

Handles calculation of deltas when the enforced style is ‘table’.

def deltas_for_first_pair(first_pair, node)

be considered to have bad alignment.
The table style is the only one where the first key-value pair can
def deltas_for_first_pair(first_pair, node)
  self.max_key_width = node.keys.map { |key| key.source.length }.max
  separator_delta = separator_delta(first_pair, first_pair, 0)
  {
    separator: separator_delta,
    value: value_delta(first_pair, first_pair) - separator_delta
  }
end

def hash_rocket_delta(first_pair, current_pair)

def hash_rocket_delta(first_pair, current_pair)
  first_pair.loc.column + max_key_width + 1 -
    current_pair.loc.operator.column
end

def key_delta(first_pair, current_pair)

def key_delta(first_pair, current_pair)
  first_pair.key_delta(current_pair)
end

def value_delta(first_pair, current_pair)

def value_delta(first_pair, current_pair)
  correct_value_column = first_pair.key.loc.column +
                         current_pair.delimiter(true).length +
                         max_key_width
  correct_value_column - current_pair.value.loc.column
end