Class: Makit::Cli::Generators::Templates::Rust::Gitignore

Inherits:
Object
  • Object
show all
Defined in:
lib/makit/cli/generators/templates/rust_templates.rb

Overview

Template for generating .gitignore file

This template creates a .gitignore file with common Rust-specific ignore patterns for build artifacts and lock files.

Instance Method Summary collapse

Constructor Details

#initialize(project_name) ⇒ Gitignore

Initialize the .gitignore template



110
111
112
# File 'lib/makit/cli/generators/templates/rust_templates.rb', line 110

def initialize(project_name)
  @project_name = project_name
end

Instance Method Details

#renderString

Render the .gitignore file content



117
118
119
120
121
122
# File 'lib/makit/cli/generators/templates/rust_templates.rb', line 117

def render
  "    target/\n    Cargo.lock\n  GITIGNORE\nend\n"