the specified version of th method_option :dry_run, type: :boolean, default: false, desc: 'dry run def package(version) invoke :test # ... end def test # ... end end $ bundle exec thor build:package --dry-run 1.2.3 Thor がRails に入っている話 - TechRacho rails/thor Wiki
# Build the specified version of $ bundle exec thor help build:package Usage: thor build:package [version] Options: [--dry-run], [--no-dry-run], [--skip-dry-run] # dry run mode # Default: fal Build the specified version of the package.
module Tasks class Build < Rails::Command::Base namespace :build desc 'package [version]', 'Build the specified version of method_option :dry_run, type: :boolean, default: false, desc: 'dry r def package(version) invoke :test # ... end def test
with -h (or --help) for more informati In addition to those commands, there are: # 省略 build:package Build the specified version of $ bin/rails build:package -h Usage: bin/rails build:package [version] Options: [--dry-run], [--no-dry-run], [--skip-dry-run] # dry run mode # Default: fal Build the specified version of the package.