Class: Hanami::CLI::Commands::App::Generate::Action Private
- Inherits:
-
Command
- Object
- Dry::CLI::Command
- Hanami::CLI::Command
- Command
- Hanami::CLI::Commands::App::Generate::Action
- Defined in:
- lib/hanami/cli/commands/app/generate/action.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
- #call(name:, slice: nil, url_path: nil, http_method: nil, skip_view: DEFAULT_SKIP_VIEW, skip_route: DEFAULT_SKIP_ROUTE, skip_tests: DEFAULT_SKIP_TESTS, template_engine: nil, force: false, **opts) ⇒ Object private
- #generator_class ⇒ Object private
Methods inherited from Command
#app, #inflector, inherited, #measure, #run_command
Methods inherited from Hanami::CLI::Command
Constructor Details
This class inherits a constructor from Hanami::CLI::Command
Instance Method Details
#call(name:, slice: nil, url_path: nil, http_method: nil, skip_view: DEFAULT_SKIP_VIEW, skip_route: DEFAULT_SKIP_ROUTE, skip_tests: DEFAULT_SKIP_TESTS, template_engine: nil, force: false, **opts) ⇒ 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.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/hanami/cli/commands/app/generate/action.rb', line 90 def call( name:, slice: nil, url_path: nil, http_method: nil, skip_view: DEFAULT_SKIP_VIEW, skip_route: DEFAULT_SKIP_ROUTE, skip_tests: DEFAULT_SKIP_TESTS, template_engine: nil, force: false, **opts ) name = Naming.new(inflector:).action_name(name) raise InvalidActionNameError.new(name) unless name.include?(".") super( name:, slice:, url_path:, skip_route:, http_method:, skip_view: skip_view || !Hanami.bundled?("hanami-view"), skip_tests:, template_engine: template_engine || default_template_engine, force: ) 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.
84 85 86 |
# File 'lib/hanami/cli/commands/app/generate/action.rb', line 84 def generator_class Generators::App::Action end |