Exception: Shai::DeviceFlowError
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
Instance Method Summary collapse
- #access_denied? ⇒ Boolean
- #authorization_pending? ⇒ Boolean
- #expired? ⇒ Boolean
-
#initialize(error_code, interval: nil) ⇒ DeviceFlowError
constructor
A new instance of DeviceFlowError.
- #slow_down? ⇒ Boolean
Constructor Details
#initialize(error_code, interval: nil) ⇒ DeviceFlowError
Returns a new instance of DeviceFlowError.
37 38 39 40 41 |
# File 'lib/shai.rb', line 37 def initialize(error_code, interval: nil) @error_code = error_code @interval = interval super(error_code) end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
35 36 37 |
# File 'lib/shai.rb', line 35 def error_code @error_code end |
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
35 36 37 |
# File 'lib/shai.rb', line 35 def interval @interval end |
Instance Method Details
#access_denied? ⇒ Boolean
51 52 53 |
# File 'lib/shai.rb', line 51 def access_denied? error_code == "access_denied" end |
#authorization_pending? ⇒ Boolean
43 44 45 |
# File 'lib/shai.rb', line 43 def error_code == "authorization_pending" end |
#expired? ⇒ Boolean
55 56 57 |
# File 'lib/shai.rb', line 55 def expired? error_code == "expired_token" end |
#slow_down? ⇒ Boolean
47 48 49 |
# File 'lib/shai.rb', line 47 def slow_down? error_code == "slow_down" end |