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.



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

def initialize(message = nil, id = nil, status = nil)
  meta    = Pliny::Errors::META[self.class]
  message = message || meta[1] + "."
  id      = 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.



19
20
21
# File 'lib/pliny/errors.rb', line 19

def status
  @status
end