Exception: LittleBlueFox::UnexpectedResponseCode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expected_code, received_code) ⇒ UnexpectedResponseCode

Returns a new instance of UnexpectedResponseCode.



52
53
54
# File 'lib/littlebluefox/client.rb', line 52

def initialize(expected_code, received_code)
  @expected_code, @received_code = expected_code, received_code
end

Instance Attribute Details

#expected_codeObject (readonly)

Returns the value of attribute expected_code.



49
50
51
# File 'lib/littlebluefox/client.rb', line 49

def expected_code
  @expected_code
end

#received_codeObject (readonly)

Returns the value of attribute received_code.



49
50
51
# File 'lib/littlebluefox/client.rb', line 49

def received_code
  @received_code
end

Instance Method Details

#to_sObject



56
57
58
# File 'lib/littlebluefox/client.rb', line 56

def to_s
  "Unexpected response code from LittleBlueFox.io (expected: #{@expected_code}, got: #{@received_code})"
end