Class: Vkit::CLI::BaseCLI
- Inherits:
-
Thor
- Object
- Thor
- Vkit::CLI::BaseCLI
- Defined in:
- lib/vkit/cli/base_cli.rb
Class Method Summary collapse
Instance Method Summary collapse
- #fetch ⇒ Object
- #init ⇒ Object
- #login ⇒ Object
- #logout ⇒ Object
- #request ⇒ Object
- #reset ⇒ Object
- #scan(datasource) ⇒ Object
- #whoami ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
9 10 11 |
# File 'lib/vkit/cli/base_cli.rb', line 9 def self.exit_on_failure? true end |
Instance Method Details
#fetch ⇒ Object
109 110 111 112 113 114 |
# File 'lib/vkit/cli/base_cli.rb', line 109 def fetch Commands::FetchCommand.new.call( grant_ref: [:grant], format: [:format] ) end |
#init ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lib/vkit/cli/base_cli.rb', line 42 def init packs = [:with]&.split(",")&.map(&:strip) Commands::InitCommand.new.call( dir: [:dir], packs: packs ) end |
#login ⇒ Object
17 18 19 20 21 22 |
# File 'lib/vkit/cli/base_cli.rb', line 17 def login Commands::LoginCommand.new( endpoint: [:endpoint], email: [:email] ).call end |
#logout ⇒ Object
30 31 32 |
# File 'lib/vkit/cli/base_cli.rb', line 30 def logout Commands::LogoutCommand.new.call end |
#request ⇒ Object
59 60 61 |
# File 'lib/vkit/cli/base_cli.rb', line 59 def request Commands::RequestCommand.new.call([:aql], ) end |
#reset ⇒ Object
35 36 37 |
# File 'lib/vkit/cli/base_cli.rb', line 35 def reset Commands::ResetCommand.new.call end |
#scan(datasource) ⇒ Object
165 166 167 168 169 170 |
# File 'lib/vkit/cli/base_cli.rb', line 165 def scan(datasource) Commands::ScanCommand.new.call( datasource, mode: [:mode] ) end |
#whoami ⇒ Object
25 26 27 |
# File 'lib/vkit/cli/base_cli.rb', line 25 def whoami Commands::WhoamiCommand.new.call end |