Class: Hanami::CLI::Commands::App::Generate::Relation Private
- Inherits:
-
Command
- Object
- Dry::CLI::Command
- Hanami::CLI::Command
- Command
- Command
- Hanami::CLI::Commands::App::Generate::Relation
- Defined in:
- lib/hanami/cli/commands/app/generate/relation.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary
Constants inherited from Command
Instance Method Summary collapse
Methods inherited from Command
Methods inherited from Command
#app, inherited, #measure, #run_command
Methods inherited from Hanami::CLI::Command
Constructor Details
This class inherits a constructor from Hanami::CLI::Commands::App::Generate::Command
Instance Method Details
#call(name:, slice: nil, gateway: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/hanami/cli/commands/app/generate/relation.rb', line 27 def call(name:, slice: nil, gateway: nil) if slice generator.call( key: name, namespace: slice, base_path: fs.join("slices", inflector.underscore(slice)), gateway: gateway ) else generator.call( key: name, namespace: app.namespace, base_path: "app", gateway: gateway ) end end |
#generator_class ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/hanami/cli/commands/app/generate/relation.rb', line 23 def generator_class Generators::App::Relation end |