Exception: RemotePartial::RemotePartialRetrivalError
- Inherits:
-
StandardError
- Object
- StandardError
- RemotePartial::RemotePartialRetrivalError
- Defined in:
- lib/remote_partial/exceptions.rb
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #error_message ⇒ Object
-
#initialize(url, source) ⇒ RemotePartialRetrivalError
constructor
A new instance of RemotePartialRetrivalError.
- #message ⇒ Object
Constructor Details
#initialize(url, source) ⇒ RemotePartialRetrivalError
Returns a new instance of RemotePartialRetrivalError.
6 7 8 9 |
# File 'lib/remote_partial/exceptions.rb', line 6 def initialize(url, source) @url = url @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
4 5 6 |
# File 'lib/remote_partial/exceptions.rb', line 4 def source @source end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/remote_partial/exceptions.rb', line 4 def url @url end |
Instance Method Details
#error_message ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/remote_partial/exceptions.rb', line 15 def if source.class == RuntimeError source. else source.inspect end end |
#message ⇒ Object
11 12 13 |
# File 'lib/remote_partial/exceptions.rb', line 11 def "Unable to retrieve remote partial at #{url}: #{}" end |