Exception: Rested::ObjectNotFound
- Defined in:
- lib/rested/error.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Attributes inherited from Error
#http_response, #message, #reason, #status, #validations
Instance Method Summary collapse
-
#initialize(res) ⇒ ObjectNotFound
constructor
A new instance of ObjectNotFound.
- #to_s ⇒ Object
Constructor Details
#initialize(res) ⇒ ObjectNotFound
Returns a new instance of ObjectNotFound.
47 48 49 50 |
# File 'lib/rested/error.rb', line 47 def initialize(res) super(res) self.id = $1 if res.content =~ /Invalid Object.*?(\d+)/ end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
45 46 47 |
# File 'lib/rested/error.rb', line 45 def id @id end |
Instance Method Details
#to_s ⇒ Object
52 53 54 |
# File 'lib/rested/error.rb', line 52 def to_s "Invalid Object ID '#{self.id}'" end |