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) ⇒ 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) ⇒ 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.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/hanami/cli/commands/app/generate/action.rb', line 81 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 ) name = Naming.new(inflector:).action_name(name) raise InvalidActionNameError.new(name) unless name.include?(".") super( name: name, slice: slice, url_path: url_path, skip_route: skip_route, http_method: http_method, skip_view: skip_view || !Hanami.bundled?("hanami-view"), skip_tests: skip_tests ) 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.
75 76 77 |
# File 'lib/hanami/cli/commands/app/generate/action.rb', line 75 def generator_class Generators::App::Action end |