Exception: Wordpress::ResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/wordpress/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#message

Instance Method Summary collapse

Methods inherited from Error

#to_s

Constructor Details

#initialize(json = {}) ⇒ ResponseError

Returns a new instance of ResponseError.



17
18
19
20
# File 'lib/wordpress/errors.rb', line 17

def initialize(json = {})
  @error = json['error'] || 'unknown'
  super json['message']
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



15
16
17
# File 'lib/wordpress/errors.rb', line 15

def error
  @error
end