Class: OAuth::CLI::BaseCommand
- Inherits:
-
Object
- Object
- OAuth::CLI::BaseCommand
- Defined in:
- lib/oauth/cli/base_command.rb
Direct Known Subclasses
AuthorizeCommand, HelpCommand, QueryCommand, SignCommand, VersionCommand
Instance Method Summary collapse
-
#initialize(stdout, stdin, stderr, arguments) ⇒ BaseCommand
constructor
A new instance of BaseCommand.
- #required_options ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(stdout, stdin, stderr, arguments) ⇒ BaseCommand
Returns a new instance of BaseCommand.
3 4 5 6 7 8 |
# File 'lib/oauth/cli/base_command.rb', line 3 def initialize(stdout, stdin, stderr, arguments) @stdout, @stdin, @stderr = stdout, stdin, stderr @options = {} option_parser.parse!(arguments) end |
Instance Method Details
#required_options ⇒ Object
20 21 22 |
# File 'lib/oauth/cli/base_command.rb', line 20 def [] end |
#run ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/oauth/cli/base_command.rb', line 10 def run missing = - .keys if missing.empty? _run else show_missing(missing) puts option_parser.help end end |