Class: BetterAuth::Hanami::Generators::RelationGenerator
- Inherits:
-
Object
- Object
- BetterAuth::Hanami::Generators::RelationGenerator
- Defined in:
- lib/better_auth/hanami/generators/relation_generator.rb
Instance Method Summary collapse
-
#initialize(destination_root: Dir.pwd, configuration: nil) ⇒ RelationGenerator
constructor
A new instance of RelationGenerator.
- #run ⇒ Object
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
#run ⇒ Object
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 |