Exception: GramV2Client::ResourceNotFound
- Inherits:
-
StandardError
- Object
- StandardError
- GramV2Client::ResourceNotFound
- Defined in:
- lib/gram_v2_client/exceptions.rb
Instance Attribute Summary collapse
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#source_exception ⇒ Object
readonly
Returns the value of attribute source_exception.
Instance Method Summary collapse
-
#initialize(query: nil, resource: nil, source_exception: nil) ⇒ ResourceNotFound
constructor
A new instance of ResourceNotFound.
- #to_s ⇒ Object
Constructor Details
#initialize(query: nil, resource: nil, source_exception: nil) ⇒ ResourceNotFound
Returns a new instance of ResourceNotFound.
10 11 12 13 14 15 |
# File 'lib/gram_v2_client/exceptions.rb', line 10 def initialize(query: nil, resource: nil, source_exception: nil) @error=self.class.name @query=query @resource=resource @source_exception=source_exception end |
Instance Attribute Details
#query ⇒ Object (readonly)
Returns the value of attribute query.
5 6 7 |
# File 'lib/gram_v2_client/exceptions.rb', line 5 def query @query end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
6 7 8 |
# File 'lib/gram_v2_client/exceptions.rb', line 6 def resource @resource end |
#source_exception ⇒ Object (readonly)
Returns the value of attribute source_exception.
7 8 9 |
# File 'lib/gram_v2_client/exceptions.rb', line 7 def source_exception @source_exception end |
Instance Method Details
#to_s ⇒ Object
17 18 19 20 21 |
# File 'lib/gram_v2_client/exceptions.rb', line 17 def to_s = "Failed." << " #{resource} not found" if resource << " with query '#{query}'" if query end |