Class: ElasticWeb::Client::Errors
- Inherits:
-
Object
- Object
- ElasticWeb::Client::Errors
- Defined in:
- lib/elasticweb/client/errors.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(data) ⇒ Errors
constructor
A new instance of Errors.
Constructor Details
#initialize(data) ⇒ Errors
Returns a new instance of Errors.
6 7 8 9 10 11 |
# File 'lib/elasticweb/client/errors.rb', line 6 def initialize(data) @status = data.dig(:status) @message = data.dig(:message) # Нету общего формата ошибок @errors = data.dig(:errors) || data.dig(:error) end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/elasticweb/client/errors.rb', line 4 def errors @errors end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/elasticweb/client/errors.rb', line 4 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/elasticweb/client/errors.rb', line 4 def status @status end |