Class: Makit::Cli::Generators::Templates::Dotnet::Readme

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

Overview

Template generator for .NET project README.md files

Generates a standard README.md file with project name, description, and common .NET build/run/test commands. Provides a good starting point for .NET project documentation.

Examples:

readme = Readme.new("MyProject")
markdown_content = readme.render

Instance Method Summary collapse

Constructor Details

#initialize(project_name) ⇒ Readme

Initialize a new README.md template generator

Parameters:

  • project_name (String)

    the name of the .NET project



99
100
101
# File 'lib/makit/cli/generators/templates/dotnet_templates.rb', line 99

def initialize(project_name)
  @project_name = project_name
end

Instance Method Details

#renderString

Render the README.md markdown content

Returns:

  • (String)

    the complete README.md content with build instructions



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/makit/cli/generators/templates/dotnet_templates.rb', line 106

def render
  "    # \#{@project_name}\n\n    A .NET project.\n\n    ## Building\n\n    ```bash\n    dotnet build\n    ```\n\n    ## Running\n\n    ```bash\n    dotnet run\n    ```\n\n    ## Testing\n\n    ```bash\n    dotnet test\n    ```\n  README\nend\n"