Exception: Grac::Exception::RequestFailed
- Inherits:
-
StandardError
- Object
- StandardError
- Grac::Exception::RequestFailed
- Defined in:
- lib/grac/exception.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(method, url, message) ⇒ RequestFailed
constructor
A new instance of RequestFailed.
- #inspect ⇒ Object
- #message ⇒ Object (also: #to_s)
Constructor Details
#initialize(method, url, message) ⇒ RequestFailed
Returns a new instance of RequestFailed.
34 35 36 37 38 |
# File 'lib/grac/exception.rb', line 34 def initialize(method, url, ) @method = (method || "").upcase @url = url @message = end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
32 33 34 |
# File 'lib/grac/exception.rb', line 32 def method @method end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
32 33 34 |
# File 'lib/grac/exception.rb', line 32 def url @url end |
Instance Method Details
#inspect ⇒ Object
44 45 46 |
# File 'lib/grac/exception.rb', line 44 def inspect "#{self.class.name}: #{}" end |
#message ⇒ Object Also known as: to_s
40 41 42 |
# File 'lib/grac/exception.rb', line 40 def "#{@method} '#{@url}' failed: #{@message}" end |