Class: GemContribute::Auth::DeviceCode
- Inherits:
-
Data
- Object
- Data
- GemContribute::Auth::DeviceCode
- Defined in:
- lib/gem_contribute/auth.rb
Instance Attribute Summary collapse
-
#device_code ⇒ Object
readonly
Returns the value of attribute device_code.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
-
#user_code ⇒ Object
readonly
Returns the value of attribute user_code.
-
#verification_uri ⇒ Object
readonly
Returns the value of attribute verification_uri.
Instance Method Summary collapse
Instance Attribute Details
#device_code ⇒ Object (readonly)
Returns the value of attribute device_code
32 33 34 |
# File 'lib/gem_contribute/auth.rb', line 32 def device_code @device_code end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at
32 33 34 |
# File 'lib/gem_contribute/auth.rb', line 32 def expires_at @expires_at end |
#interval ⇒ Object (readonly)
Returns the value of attribute interval
32 33 34 |
# File 'lib/gem_contribute/auth.rb', line 32 def interval @interval end |
#user_code ⇒ Object (readonly)
Returns the value of attribute user_code
32 33 34 |
# File 'lib/gem_contribute/auth.rb', line 32 def user_code @user_code end |
#verification_uri ⇒ Object (readonly)
Returns the value of attribute verification_uri
32 33 34 |
# File 'lib/gem_contribute/auth.rb', line 32 def verification_uri @verification_uri end |
Instance Method Details
#expired?(now: Time.now) ⇒ Boolean
33 34 35 |
# File 'lib/gem_contribute/auth.rb', line 33 def expired?(now: Time.now) now >= expires_at end |
#with_interval(new_interval) ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'lib/gem_contribute/auth.rb', line 37 def with_interval(new_interval) self.class.new( device_code: device_code, user_code: user_code, verification_uri: verification_uri, expires_at: expires_at, interval: new_interval ) end |