Class: BetterAuth::Hanami::Generators::RelationGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/better_auth/hanami/generators/relation_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(destination_root: Dir.pwd, configuration: nil) ⇒ RelationGenerator

Returns a new instance of RelationGenerator.



9
10
11
12
# File 'lib/better_auth/hanami/generators/relation_generator.rb', line 9

def initialize(destination_root: Dir.pwd, configuration: nil)
  @destination_root = destination_root
  @configuration = configuration
end

Instance Method Details

#runObject



14
15
16
17
18
19
20
# File 'lib/better_auth/hanami/generators/relation_generator.rb', line 14

def run
  create_base_repo
  generator_config && tables.each_value do |table|
    create_relation(table)
    create_repo(table)
  end
end