Exception: Strapi::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/strapi/error.rb

Overview

An error raised within the Strapi ruby library

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ Error

Returns a new instance of Error.



8
9
10
11
12
13
14
# File 'lib/strapi/error.rb', line 8

def initialize(hash = {})
  super
  @status = hash['status']
  @name = hash['name']
  @message = hash['message']
  @details = hash['details']
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



6
7
8
# File 'lib/strapi/error.rb', line 6

def details
  @details
end

#messageObject (readonly)

Returns the value of attribute message.



6
7
8
# File 'lib/strapi/error.rb', line 6

def message
  @message
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/strapi/error.rb', line 6

def name
  @name
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/strapi/error.rb', line 6

def status
  @status
end