Exception: BaseCRM::ErrorsCollection
- Inherits:
-
StandardError
- Object
- StandardError
- BaseCRM::ErrorsCollection
- Defined in:
- lib/basecrm/errors.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#logref ⇒ Object
(also: #request_id)
readonly
Returns the value of attribute logref.
Instance Method Summary collapse
-
#initialize(errors, meta) ⇒ ErrorsCollection
constructor
A new instance of ErrorsCollection.
- #to_s ⇒ Object
Constructor Details
#initialize(errors, meta) ⇒ ErrorsCollection
Returns a new instance of ErrorsCollection.
53 54 55 56 57 58 |
# File 'lib/basecrm/errors.rb', line 53 def initialize(errors, ) @errors = errors @http_status = [:http_status] @logref = [:logref] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
47 48 49 |
# File 'lib/basecrm/errors.rb', line 47 def errors @errors end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
49 50 51 |
# File 'lib/basecrm/errors.rb', line 49 def http_status @http_status end |
#logref ⇒ Object (readonly) Also known as: request_id
Returns the value of attribute logref.
49 50 51 |
# File 'lib/basecrm/errors.rb', line 49 def logref @logref end |
Instance Method Details
#to_s ⇒ Object
60 61 62 63 |
# File 'lib/basecrm/errors.rb', line 60 def to_s status = "[#{@logref}] http_status=#{@http_status}\n" status + @errors.map(&:to_s).join("\n") end |