Class: Fastlane::Client::ErrorResponse
- Inherits:
-
Object
- Object
- Fastlane::Client::ErrorResponse
- Defined in:
- lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(response) ⇒ ErrorResponse
constructor
A new instance of ErrorResponse.
Constructor Details
#initialize(response) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
6 7 8 9 10 11 12 13 |
# File 'lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb', line 6 def initialize(response) unless response[:body].nil? || response[:body].empty? response_body = JSON.parse(response[:body], symbolize_names: true) @code = response_body[:error][:code] @message = response_body[:error][:message] @status = response_body[:error][:status] end end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb', line 4 def code @code end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb', line 4 def @message end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb', line 4 def status @status end |