Exception: SearchFlip::ResponseError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, body:) ⇒ ResponseError

Returns a new instance of ResponseError.



41
42
43
44
45
46
# File 'lib/search_flip.rb', line 41

def initialize(code:, body:)
  super

  @code = code
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



39
40
41
# File 'lib/search_flip.rb', line 39

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



39
40
41
# File 'lib/search_flip.rb', line 39

def code
  @code
end

Instance Method Details

#to_sObject



48
49
50
# File 'lib/search_flip.rb', line 48

def to_s
  "#{self.class.name} (#{code}): #{body}"
end