Exception: TD::Error
- Inherits:
-
StandardError
- Object
- StandardError
- TD::Error
show all
- Defined in:
- lib/tdlib/errors.rb
Overview
Proxy class that is used in failed promises to represent TDlib errors
Instance Method Summary
collapse
Constructor Details
#initialize(td_error) ⇒ Error
Returns a new instance of Error.
10
11
12
|
# File 'lib/tdlib/errors.rb', line 10
def initialize(td_error)
@td_error = td_error
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
14
15
16
|
# File 'lib/tdlib/errors.rb', line 14
def method_missing(method, *args)
@td_error.public_send(method, *args)
end
|
Instance Method Details
#message ⇒ Object
26
27
28
|
# File 'lib/tdlib/errors.rb', line 26
def message
@td_error.message
end
|
#respond_to_missing?(*args) ⇒ Boolean
18
19
20
|
# File 'lib/tdlib/errors.rb', line 18
def respond_to_missing?(*args)
@td_error.respond_to?(*args)
end
|
#to_s ⇒ Object
Also known as:
inspect
22
23
24
|
# File 'lib/tdlib/errors.rb', line 22
def to_s
@td_error.inspect
end
|