Class: Hanami::CLI::Generators::App::RubyFileWriter Private
- Inherits:
-
Object
- Object
- Hanami::CLI::Generators::App::RubyFileWriter
- Defined in:
- lib/hanami/cli/generators/app/ruby_file_writer.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(key:, namespace:, base_path:, relative_parent_class:, extra_namespace: nil, body: []) ⇒ Object private
-
#initialize(fs:, inflector:) ⇒ RubyFileWriter
constructor
private
A new instance of RubyFileWriter.
Constructor Details
#initialize(fs:, inflector:) ⇒ RubyFileWriter
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 RubyFileWriter.
17 18 19 20 |
# File 'lib/hanami/cli/generators/app/ruby_file_writer.rb', line 17 def initialize(fs:, inflector:) @fs = fs @inflector = inflector end |
Instance Method Details
#call(key:, namespace:, base_path:, relative_parent_class:, extra_namespace: nil, body: []) ⇒ 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 32 33 34 35 |
# File 'lib/hanami/cli/generators/app/ruby_file_writer.rb', line 24 def call(key:, namespace:, base_path:, relative_parent_class:, extra_namespace: nil, body: []) ClassFile.new( fs: fs, inflector: inflector, key: key, namespace: namespace, base_path: base_path, relative_parent_class: relative_parent_class, extra_namespace: extra_namespace, body: body, ).write end |