Class: WayOfWorking::ReadmeBadge::Generators::Init
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- WayOfWorking::ReadmeBadge::Generators::Init
- Includes:
- Thor::Actions
- Defined in:
- lib/way_of_working/readme_badge/generators/init.rb
Overview
This generator adds the alexrc file
Instance Method Summary collapse
- #copy_way_of_working_documentation ⇒ Object
- #create_template_readme_if_missing ⇒ Object
- #insert_badge_holder_into_readme ⇒ Object
Instance Method Details
#copy_way_of_working_documentation ⇒ Object
32 33 34 |
# File 'lib/way_of_working/readme_badge/generators/init.rb', line 32 def copy_way_of_working_documentation template 'docs/way_of_working/readme-badges.md' end |
#create_template_readme_if_missing ⇒ Object
17 18 19 |
# File 'lib/way_of_working/readme_badge/generators/init.rb', line 17 def create_template_readme_if_missing template_if_missing 'README.md' end |
#insert_badge_holder_into_readme ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/way_of_working/readme_badge/generators/init.rb', line 21 def insert_badge_holder_into_readme content = <<~MARKDOWN + HOLDER_END_TAG <!-- Way of Working: Main Badge Holder Start --> #{main_badge} <!-- Way of Working: Additional Badge Holder Start --> MARKDOWN insert_into_file 'README.md', content, after: /^#\s.*?\n/ end |