<commit_before>require File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'neo4j.rb')

class Neo4j::Generators::ModelGenerator < Neo4j::Generators::Base #:nodoc:
  argument :attributes, type: :array, default: [], banner: 'field:type field:type'

  check_class_collision

  class_option :timestamps, type: :boolean
  class_option :parent,     type: :string, desc: 'The parent class for the generated model'
  class_option :indices,    type: :array,  desc: 'The properties which should be indexed'
  class_option :has_one,    type: :array,  desc: 'A list of has_one relationships'
  class_option :has_many,   type: :array,  desc: 'A list of has_many relationships'

  def create_model_file
    template 'model.erb', File.join('app/models', "#{singular_name}.rb")
  end

  protected

  def migration?
    false<commit_msg>Adds class_path to generated model file path.<commit_after>require File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'neo4j.rb')

class Neo4j::Generators::ModelGenerator < Neo4j::Generators::Base #:nodoc:
  argument :attributes, type: :array, default: [], banner: 'field:type field:type'

  check_class_collision

  class_option :timestamps, type: :boolean
  class_option :parent,     type: :string, desc: 'The parent class for the generated model'
  class_option :indices,    type: :array,  desc: 'The properties which should be indexed'
  class_option :has_one,    type: :array,  desc: 'A list of has_one relationships'
  class_option :has_many,   type: :array,  desc: 'A list of has_many relationships'

  def create_model_file
    template 'model.erb', File.join('app/models', class_path, "#{singular_name}.rb")
  end

  protected

  def migration?
    false
{'fraction_non_alphanumeric': 0.13443396226415094, 'fraction_numerical': 0.003537735849056604, 'mean_word_length': 4.6755852842809364, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2646264', 'n_tokens_mistral': 562, 'n_tokens_neox': 541, 'n_words': 154}