class RuboCop::Cop::Rails::EnumHash

def build_hash(array)

def build_hash(array)
  hash = array.children.each_with_index.map do |elem, index|
    "#{source(elem)} => #{index}"
  end.join(', ')
  "{#{hash}}"
end