Exception: ResoTransport::ResourceError
- Inherits:
-
StandardError
- Object
- StandardError
- ResoTransport::ResourceError
- Defined in:
- lib/reso_transport/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(resource) ⇒ ResourceError
constructor
A new instance of ResourceError.
- #message ⇒ Object
- #resource_name ⇒ Object
Constructor Details
#initialize(resource) ⇒ ResourceError
Returns a new instance of ResourceError.
5 6 7 8 |
# File 'lib/reso_transport/errors.rb', line 5 def initialize(resource) @resource = resource super end |
Instance Attribute Details
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
3 4 5 |
# File 'lib/reso_transport/errors.rb', line 3 def resource @resource end |
Instance Method Details
#message ⇒ Object
16 17 18 |
# File 'lib/reso_transport/errors.rb', line 16 def "Request error for #{resource_name}" end |
#resource_name ⇒ Object
10 11 12 13 14 |
# File 'lib/reso_transport/errors.rb', line 10 def resource_name return resource.name if resource.respond_to?(:name) resource || 'unknown' end |