Skip to content

Instantly share code, notes, and snippets.

@pruthvi6767
Last active March 22, 2018 20:23
Show Gist options
  • Save pruthvi6767/6867bc040ebf6ac463270b24351350b8 to your computer and use it in GitHub Desktop.
Save pruthvi6767/6867bc040ebf6ac463270b24351350b8 to your computer and use it in GitHub Desktop.
class CLI < Thor
desc 'auto', 'start'
method_option :user,
required: true,
desc: 'username',
aliases: '-u'
method_option :pwd,
aliases: '-p',
required: true,
desc: "password"
method_option :auth_token
aliases: '-t',
required: true,
desc: ' Auth Token'
method_option :addtag,
aliases: '-a',
required: true,
desc: 'Tag'
def auto
end
end
---------------------------------------------------
@pruthvi6767
Copy link
Author

pruthvi6767 commented Mar 22, 2018

This fixed it

method_option :user,
required: true,
desc: 'username',
aliases: '-u'
method_option :pwd,
required: true,
aliases: '-p',
desc: "password"

&&&&
def auto
puts 'hello'
end

implementing the method solved it I believe..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment