Exception: SearchFlip::ResponseError

Inherits:
Error
  • 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.



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

def initialize(code:, body:)
  super

  @code = code
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

Instance Method Details

#to_sObject



54
55
56
# File 'lib/search_flip.rb', line 54

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