Exception: RubyBox::RubyBoxError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ruby-box/exceptions.rb

Direct Known Subclasses

AuthError, ItemNameInUse, RequestError

Instance Method Summary collapse

Constructor Details

#initialize(error_json) ⇒ RubyBoxError

Returns a new instance of RubyBoxError.



3
4
5
# File 'lib/ruby-box/exceptions.rb', line 3

def initialize(error_json)
  @error_json = error_json
end

Instance Method Details

#[](key) ⇒ Object



7
8
9
# File 'lib/ruby-box/exceptions.rb', line 7

def [](key)
  @error_json[key]
end