Class: Makit::Cli::Generators::Templates::Rust::Readme
- Inherits:
-
Object
- Object
- Makit::Cli::Generators::Templates::Rust::Readme
- Defined in:
- lib/makit/cli/generators/templates/rust_templates.rb
Overview
Template for generating README.md documentation
This template creates project documentation with standard sections for building, running, and testing the Rust project.
Instance Method Summary collapse
-
#initialize(project_name) ⇒ Readme
constructor
Initialize the README.md template.
-
#render ⇒ String
Render the README.md file content.
Constructor Details
#initialize(project_name) ⇒ Readme
Initialize the README.md template
68 69 70 |
# File 'lib/makit/cli/generators/templates/rust_templates.rb', line 68 def initialize(project_name) @project_name = project_name end |
Instance Method Details
#render ⇒ String
Render the README.md file content
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/makit/cli/generators/templates/rust_templates.rb', line 75 def render <<~README # #{@project_name} A Rust project. ## Building ```bash cargo build ``` ## Running ```bash cargo run ``` ## Testing ```bash cargo test ``` README end |