Exception: Rested::ObjectNotFound

Inherits:
Error
  • Object
show all
Defined in:
lib/rested/error.rb

Instance Attribute Summary (collapse)

Attributes inherited from Error

#http_response, #message, #reason, #status, #validations

Instance Method Summary (collapse)

Constructor Details

- (ObjectNotFound) initialize(res)



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

- (Object) id

Returns the value of attribute id



45
46
47
# File 'lib/rested/error.rb', line 45

def id
  @id
end

Instance Method Details

- (Object) to_s



52
53
54
# File 'lib/rested/error.rb', line 52

def to_s
    "Invalid Object ID '#{self.id}'"
end