Exception: VkApi::Error
- Inherits:
-
Exception
- Object
- Exception
- VkApi::Error
- Defined in:
- lib/vk-api/error.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(env) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(env) ⇒ 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 |