Class: Beerbelly::Client::Error
- Inherits:
-
Struct
- Object
- Struct
- Beerbelly::Client::Error
- Defined in:
- lib/beerbelly/client/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
5 6 7 |
# File 'lib/beerbelly/client/error.rb', line 5 def code @code end |
Instance Method Details
#to_s ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/beerbelly/client/error.rb', line 6 def to_s case code when 400 'Invalid query' when 401 'Unauthorized' when 404 'Not found' when 406 'Invalid format' end end |