Exception: Pliny::Errors::HTTPStatusError

Inherits:
Error
  • Object
show all
Defined in:
lib/pliny/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#id

Instance Method Summary collapse

Methods inherited from Error

render

Constructor Details

#initialize(message = nil, id = nil, status = nil) ⇒ HTTPStatusError

Returns a new instance of HTTPStatusError.



23
24
25
26
27
28
29
# File 'lib/pliny/errors.rb', line 23

def initialize(message = nil, id = nil, status = nil)
  meta = Pliny::Errors::META[self.class]
  message ||= meta[1] + "."
  id ||= meta[1].downcase.tr(" ", "_").to_sym
  @status = status || meta[0]
  super(message, id)
end

Instance Attribute Details

#statusObject

Returns the value of attribute status.



21
22
23
# File 'lib/pliny/errors.rb', line 21

def status
  @status
end