Class: Hanami::CLI::Generators::App::View Private
- Inherits:
-
Object
- Object
- Hanami::CLI::Generators::App::View
- Defined in:
- lib/hanami/cli/generators/app/view.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, key, format, slice) ⇒ Object private
-
#initialize(fs:, inflector:) ⇒ View
constructor
private
A new instance of View.
Constructor Details
#initialize(fs:, inflector:) ⇒ View
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 View.
16 17 18 19 |
# File 'lib/hanami/cli/generators/app/view.rb', line 16 def initialize(fs:, inflector:) @fs = fs @inflector = inflector end |
Instance Method Details
#call(app, key, format, slice) ⇒ 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.
23 24 25 26 27 28 29 30 31 |
# File 'lib/hanami/cli/generators/app/view.rb', line 23 def call(app, key, format, slice) context = ViewContext.new(inflector, app, slice, key) if slice generate_for_slice(context, format, slice) else generate_for_app(context, format, slice) end end |