class AwsRsync::Command
Public Class Methods
dispatch(m, args, options, config)
click to toggle source
Calls superclass method
# File lib/aws_rsync/command.rb, line 19 def dispatch(m, args, options, config) # Allow calling for help via: # aws_rsync command help # aws_rsync command -h # aws_rsync command --help # aws_rsync command -D # # as well thor's normal way: # # aws_rsync help command help_flags = Thor::HELP_MAPPINGS + ["help"] if args.length > 1 && !(args & help_flags).empty? args -= help_flags args.insert(-2, "help") end # aws_rsync --version # aws_rsync -v version_flags = ["-v", "--version"] if args.length == 1 && !(args & version_flags).empty? args = ["version"] end super end