Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.
This repository was archived by the owner on Nov 10, 2024. It is now read-only.

Post: HowTo: enhance Thor script help listings #9

@tamouse

Description

@tamouse

In the rails_template thor script, I enhanced the help capabilities. Talk about doing that. The heart of it is re-purposing the help method:


  def self.help(shell, subcommand = false)
    shell.say HelpText::HELP_PREAMBLE % {package_name: PACKAGE_NAME}, :blue
    super
    shell.say HelpText::HELP_EPILOGUE, :blue
  end

The help text is defined as constants in another file to save space in the original.

See https://github.com/tamouse/rails_template

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaAn idea for a blog post

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions