Class: Hanami::CLI::Generators::App::ClassFile Private
- Inherits:
-
Object
- Object
- Hanami::CLI::Generators::App::ClassFile
- 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
-
#initialize(fs:, inflector:, key:, namespace:, base_path:, relative_parent_class:, extra_namespace: nil, body: []) ⇒ ClassFile
constructor
private
A new instance of ClassFile.
- #write ⇒ Object private
Constructor Details
#initialize(fs:, inflector:, key:, namespace:, base_path:, relative_parent_class:, extra_namespace: nil, body: []) ⇒ ClassFile
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 ClassFile.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/hanami/cli/generators/app/ruby_file_writer.rb', line 45 def initialize( fs:, inflector:, key:, namespace:, base_path:, relative_parent_class:, extra_namespace: nil, body: [] ) @fs = fs @inflector = inflector @key = key @namespace = namespace @base_path = base_path @extra_namespace = extra_namespace&.downcase @relative_parent_class = relative_parent_class @body = body end |
Instance Method Details
#write ⇒ 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.
65 66 67 |
# File 'lib/hanami/cli/generators/app/ruby_file_writer.rb', line 65 def write fs.write(path, file_contents) end |