Exception: VkApi::Error
- Inherits:
-
Exception
- Object
- Exception
- VkApi::Error
show all
- Defined in:
- lib/vk-api/error.rb
Instance Method Summary
collapse
Constructor Details
#initialize(env) ⇒ Error
Returns a new instance of Error.
4
5
6
|
# File 'lib/vk-api/error.rb', line 4
def initialize(env)
@env = env
end
|
Instance Method Details
#[](key) ⇒ Object
12
13
14
|
# File 'lib/vk-api/error.rb', line 12
def [](key)
@env[key]
end
|
#to_s ⇒ Object
8
9
10
|
# File 'lib/vk-api/error.rb', line 8
def to_s
"#{@env[:error]}: #{@env[:description]}"
end
|