Class: Hanami::CLI::Commands::Destroy::Model Private
- Inherits:
-
Command
- Object
- Hanami::CLI::Command
- Command
- Hanami::CLI::Commands::Destroy::Model
- Defined in:
- lib/hanami/cli/commands/destroy/model.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.
Instance Method Summary collapse
Methods inherited from Command
Constructor Details
This class inherits a constructor from Hanami::CLI::Commands::Command
Instance Method Details
#call(model:, **options) ⇒ 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.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/hanami/cli/commands/destroy/model.rb', line 20 def call(model:, **) model = Utils::String.transform(model, :underscore, :singularize) context = Context.new(model: model, options: ) assert_valid_model!(context) destroy_repository_spec(context) destroy_entity_spec(context) destroy_repository(context) destroy_entity(context) end |