Class: SSO::Client::Passport
- Inherits:
-
Object
- Object
- SSO::Client::Passport
- Defined in:
- lib/sso/client/passport.rb
Instance Attribute Summary collapse
-
#chip ⇒ Object
readonly
Returns the value of attribute chip.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
-
#state ⇒ Object
Returns the value of attribute state.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
- #delta ⇒ Object
-
#initialize(id:, secret:, state:, user:, chip: nil) ⇒ Passport
constructor
A new instance of Passport.
- #modified! ⇒ Object
- #modified? ⇒ Boolean
- #unmodified? ⇒ Boolean
- #unverified? ⇒ Boolean
- #verified! ⇒ Object
- #verified? ⇒ Boolean
Constructor Details
#initialize(id:, secret:, state:, user:, chip: nil) ⇒ Passport
Returns a new instance of Passport.
8 9 10 11 12 13 14 |
# File 'lib/sso/client/passport.rb', line 8 def initialize(id:, secret:, state:, user:, chip: nil) @id = id @secret = secret @state = state @user = user @chip = chip end |
Instance Attribute Details
#chip ⇒ Object (readonly)
Returns the value of attribute chip.
5 6 7 |
# File 'lib/sso/client/passport.rb', line 5 def chip @chip end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/sso/client/passport.rb', line 5 def id @id end |
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
5 6 7 |
# File 'lib/sso/client/passport.rb', line 5 def secret @secret end |
#state ⇒ Object
Returns the value of attribute state.
6 7 8 |
# File 'lib/sso/client/passport.rb', line 6 def state @state end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/sso/client/passport.rb', line 6 def user @user end |
Instance Method Details
#delta ⇒ Object
40 41 42 |
# File 'lib/sso/client/passport.rb', line 40 def delta { state: state, user: user } end |
#modified! ⇒ Object
28 29 30 |
# File 'lib/sso/client/passport.rb', line 28 def modified! @modified = true end |
#modified? ⇒ Boolean
32 33 34 |
# File 'lib/sso/client/passport.rb', line 32 def modified? @modified == true end |
#unmodified? ⇒ Boolean
36 37 38 |
# File 'lib/sso/client/passport.rb', line 36 def unmodified? !modified? end |
#unverified? ⇒ Boolean
24 25 26 |
# File 'lib/sso/client/passport.rb', line 24 def unverified? !verified? end |
#verified! ⇒ Object
16 17 18 |
# File 'lib/sso/client/passport.rb', line 16 def verified! @verified = true end |
#verified? ⇒ Boolean
20 21 22 |
# File 'lib/sso/client/passport.rb', line 20 def verified? @verified == true end |