Exception: OrganizationAudit::Repo::RequestError
- Inherits:
-
StandardError
- Object
- StandardError
- OrganizationAudit::Repo::RequestError
- Defined in:
- lib/organization_audit/repo.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(message, url = nil, code = 500, body = '') ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(message, url = nil, code = 500, body = '') ⇒ RequestError
Returns a new instance of RequestError.
12 13 14 15 16 17 |
# File 'lib/organization_audit/repo.rb', line 12 def initialize(, url=nil, code=500, body='') @url = url @code = Integer(code) @body = body super "#{}\n#{url}\nCode: #{code}\n#{body}" end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
10 11 12 |
# File 'lib/organization_audit/repo.rb', line 10 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
10 11 12 |
# File 'lib/organization_audit/repo.rb', line 10 def code @code end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
10 11 12 |
# File 'lib/organization_audit/repo.rb', line 10 def url @url end |