Class: Hanami::CLI::Generators::App::Action Private

Inherits:
Object
  • Object
show all
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.

Since:

  • 2.0.0

Instance Method Summary collapse

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.

Since:

  • 2.0.0



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.

Since:

  • 2.0.0



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