Class: Hanami::CLI::Generators::App::Action Private
- Inherits:
-
Object
- Object
- Hanami::CLI::Generators::App::Action
- Defined in:
- lib/hanami/cli/generators/app/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(app, controller, action, url, http, format, skip_view, skip_route, slice, context: nil) ⇒ Object private
-
#initialize(fs:, inflector:) ⇒ Action
constructor
private
A new instance of Action.
Constructor Details
#initialize(fs:, inflector:) ⇒ Action
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.
Returns a new instance of Action.
17 18 19 20 |
# File 'lib/hanami/cli/generators/app/action.rb', line 17 def initialize(fs:, inflector:) @fs = fs @inflector = inflector end |
Instance Method Details
#call(app, controller, action, url, http, format, skip_view, skip_route, slice, context: 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.
24 25 26 27 28 29 30 31 |
# File 'lib/hanami/cli/generators/app/action.rb', line 24 def call(app, controller, action, url, http, format, skip_view, skip_route, slice, context: nil) context ||= ActionContext.new(inflector, app, slice, controller, action) if slice generate_for_slice(controller, action, url, http, format, skip_view, skip_route, slice, context) else generate_for_app(controller, action, url, http, format, skip_view, skip_route, context) end end |