Exception: Yandex::Direct::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Yandex::Direct::Error
- Defined in:
- lib/yandex/direct/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(request_id, code, text, detail) ⇒ Error
constructor
A new instance of Error.
- #message ⇒ Object
Constructor Details
#initialize(request_id, code, text, detail) ⇒ Error
Returns a new instance of Error.
4 5 6 7 8 9 |
# File 'lib/yandex/direct/error.rb', line 4 def initialize(request_id, code, text, detail) self.request_id = request_id self.code = code self.text = text self.detail = detail end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/yandex/direct/error.rb', line 3 def code @code end |
#detail ⇒ Object
Returns the value of attribute detail.
3 4 5 |
# File 'lib/yandex/direct/error.rb', line 3 def detail @detail end |
#request_id ⇒ Object
Returns the value of attribute request_id.
3 4 5 |
# File 'lib/yandex/direct/error.rb', line 3 def request_id @request_id end |
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/yandex/direct/error.rb', line 3 def text @text end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/yandex/direct/error.rb', line 10 def "#{self.text} (#{self.code}): #{self.detail}" end |