Class: Hanami::CLI::Generators::App::Mailer Private
- Inherits:
-
Object
- Object
- Hanami::CLI::Generators::App::Mailer
- Defined in:
- lib/hanami/cli/generators/app/mailer.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.
Constant Summary collapse
- TEMPLATES_FOLDER =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"templates/mailers"- DEFAULT_TEMPLATE_ENGINE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"erb"
Instance Method Summary collapse
- #call(key:, namespace:, base_path:, template_engine: DEFAULT_TEMPLATE_ENGINE, force: false) ⇒ Object private
-
#initialize(fs:, inflector:, out: $stdout) ⇒ Mailer
constructor
private
A new instance of Mailer.
Constructor Details
#initialize(fs:, inflector:, out: $stdout) ⇒ Mailer
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 Mailer.
16 17 18 19 20 |
# File 'lib/hanami/cli/generators/app/mailer.rb', line 16 def initialize(fs:, inflector:, out: $stdout) @fs = fs @inflector = inflector @out = out end |
Instance Method Details
#call(key:, namespace:, base_path:, template_engine: DEFAULT_TEMPLATE_ENGINE, force: false) ⇒ 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.
22 23 24 25 26 27 28 |
# File 'lib/hanami/cli/generators/app/mailer.rb', line 22 def call(key:, namespace:, base_path:, template_engine: DEFAULT_TEMPLATE_ENGINE, force: false, **) mailer_class_file(key:, namespace:, base_path:).then do |mailer_class| mailer_class.create(force:) mailer_class_name = mailer_class.fully_qualified_name create_template_files(key:, base_path:, mailer_class_name:, template_engine:, force:) end end |