Exception: FakeDynamo::Error
- Inherits:
-
StandardError
- Object
- StandardError
- FakeDynamo::Error
show all
- Defined in:
- lib/fake_dynamo/exceptions.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(detail = '') ⇒ Error
11
12
13
14
|
# File 'lib/fake_dynamo/exceptions.rb', line 11
def initialize(detail='')
@detail = detail
super(detail)
end
|
Instance Attribute Details
#detail ⇒ Object
Returns the value of attribute detail.
9
10
11
|
# File 'lib/fake_dynamo/exceptions.rb', line 9
def detail
@detail
end
|
Instance Method Details
#class_name ⇒ Object
23
24
25
|
# File 'lib/fake_dynamo/exceptions.rb', line 23
def class_name
self.class.name.split('::').last
end
|
#response ⇒ Object
16
17
18
19
20
21
|
# File 'lib/fake_dynamo/exceptions.rb', line 16
def response
{
'__type' => "#{self.class.type}##{class_name}",
'message' => "#{self.class.description}: #{@detail}"
}
end
|
#status ⇒ Object
27
28
29
|
# File 'lib/fake_dynamo/exceptions.rb', line 27
def status
self.class.status
end
|