Class: Emasser::Test
- Inherits:
-
SubCommandBase
- Object
- Thor
- SubCommandBase
- Emasser::Test
- Defined in:
- lib/emasser/get.rb
Overview
The Test Connection endpoint is provided by eMASS to verify and troubleshoot the connection to the web service.
Endpoint:
/api - Test connection to the API
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SubCommandBase
Methods included from OutputConverters
Methods included from InputConverters
Methods included from OptionsParser
#optional_options, #required_options
Class Method Details
.exit_on_failure? ⇒ Boolean
36 37 38 |
# File 'lib/emasser/get.rb', line 36 def self.exit_on_failure? true end |
Instance Method Details
#connection ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/emasser/get.rb', line 42 def connection result = EmassClient::TestApi.new.test_connection puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling TestApi->test_connection'.red puts to_output_hash(e) end |