Exception: TimestampAPI::ResourceNotFound

Inherits:
StandardError
  • Object
show all
Defined in:
lib/timestamp_api/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, id) ⇒ ResourceNotFound

Returns a new instance of ResourceNotFound.



75
76
77
78
# File 'lib/timestamp_api/errors.rb', line 75

def initialize(klass, id)
  @klass = klass
  @id    = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



73
74
75
# File 'lib/timestamp_api/errors.rb', line 73

def id
  @id
end

#klassObject (readonly)

Returns the value of attribute klass.



73
74
75
# File 'lib/timestamp_api/errors.rb', line 73

def klass
  @klass
end

Instance Method Details

#messageObject



80
81
82
# File 'lib/timestamp_api/errors.rb', line 80

def message
  "No `#{klass}` was found with id `#{id}` (API returned 404)"
end