Class: Hanami::CLI::Generators::App::Struct Private
- Inherits:
-
Object
- Object
- Hanami::CLI::Generators::App::Struct
- Defined in:
- lib/hanami/cli/generators/app/struct.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:) ⇒ Object private
-
#initialize(fs:, inflector:, out: $stdout) ⇒ Struct
constructor
private
A new instance of Struct.
Constructor Details
#initialize(fs:, inflector:, out: $stdout) ⇒ Struct
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 Struct.
12 13 14 15 16 |
# File 'lib/hanami/cli/generators/app/struct.rb', line 12 def initialize(fs:, inflector:, out: $stdout) @fs = fs @inflector = inflector @out = out end |
Instance Method Details
#call(key:, namespace:, base_path:) ⇒ 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.
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/hanami/cli/generators/app/struct.rb', line 20 def call(key:, namespace:, base_path:) RubyFileWriter.new( fs: fs, inflector: inflector, ).call( key: key, namespace: namespace, base_path: base_path, extra_namespace: "Structs", relative_parent_class: "DB::Struct", ) end |