You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: graph_generator.rb
    path of file: ./repos/stateful_enum/lib/generators/stateful_enum
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'rails/generators/named_base'

module StatefulEnum
  module Generators
    class GraphGenerator < ::Rails::Generators::NamedBase
      desc 'Draws a state machine diagram as a PNG file'
      def draw
        require 'ruby-graphviz'
        StatefulEnum::Machine.prepend Sta
    
      def initialize(model, column, states, prefix, suffix, &block)
        @states, @prefix, @suffix = states, prefix, suffix
        @g = ::GraphViz.new 'G', rankdir: 'TB'

        states.each do |state|
          @g.add_node state.to_s, label: state.to_s, width: '1', height: '1', shape: 'ellipse'
        end
        if (default_value = model.columns_hash[column.to_s].default)
          default_label = model.defined_enums[column.to_s].key default_value.to_i  # SQLite returns the default value in String
          @g.add_edge @g.add_node('start state', shape: 'point'), @g.get_node(default_label)
        end