Add this line to your application's Gemfile:
gem "moulinettes"Generate a new moulinette using the generator:
# Both syntaxes are valid and will generate the same file
bundle exec rails g moulinettes:moulinette MyMoulinette
bundle exec rails g moulinettes:moulinette my_moulinette This will generate a new file in lib/tasks/moulinettes using the template provided in the gem.
You can also pass the following options to the generator:
--editoror-eto specify the editor to be used to open the file. Default is$EDITOR.--openor-oto flag the file to be opened in your default editor after generation. Default istrue.
You can then run the task using the following command:
bundle exec rails moulinettes:my_moulinette