Class: MultiAuthSample::OAuthCCGCredentials
- Inherits:
-
Object
- Object
- MultiAuthSample::OAuthCCGCredentials
- Defined in:
- lib/multi_auth_sample/http/auth/o_auth_ccg.rb
Overview
Data class for OAuthCCGCredentials.
Instance Attribute Summary collapse
-
#o_auth_client_id ⇒ Object
readonly
Returns the value of attribute o_auth_client_id.
-
#o_auth_client_secret ⇒ Object
readonly
Returns the value of attribute o_auth_client_secret.
-
#o_auth_token ⇒ Object
readonly
Returns the value of attribute o_auth_token.
Instance Method Summary collapse
- #clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil) ⇒ Object
-
#initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil) ⇒ OAuthCCGCredentials
constructor
A new instance of OAuthCCGCredentials.
Constructor Details
#initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil) ⇒ OAuthCCGCredentials
Returns a new instance of OAuthCCGCredentials.
68 69 70 71 72 73 74 75 |
# File 'lib/multi_auth_sample/http/auth/o_auth_ccg.rb', line 68 def initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil) raise ArgumentError, 'o_auth_client_id cannot be nil' if o_auth_client_id.nil? raise ArgumentError, 'o_auth_client_secret cannot be nil' if o_auth_client_secret.nil? @o_auth_client_id = o_auth_client_id @o_auth_client_secret = o_auth_client_secret @o_auth_token = o_auth_token end |
Instance Attribute Details
#o_auth_client_id ⇒ Object (readonly)
Returns the value of attribute o_auth_client_id.
66 67 68 |
# File 'lib/multi_auth_sample/http/auth/o_auth_ccg.rb', line 66 def o_auth_client_id @o_auth_client_id end |
#o_auth_client_secret ⇒ Object (readonly)
Returns the value of attribute o_auth_client_secret.
66 67 68 |
# File 'lib/multi_auth_sample/http/auth/o_auth_ccg.rb', line 66 def o_auth_client_secret @o_auth_client_secret end |
#o_auth_token ⇒ Object (readonly)
Returns the value of attribute o_auth_token.
66 67 68 |
# File 'lib/multi_auth_sample/http/auth/o_auth_ccg.rb', line 66 def o_auth_token @o_auth_token end |
Instance Method Details
#clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil) ⇒ Object
77 78 79 80 81 82 83 84 85 86 |
# File 'lib/multi_auth_sample/http/auth/o_auth_ccg.rb', line 77 def clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil) o_auth_client_id ||= self.o_auth_client_id o_auth_client_secret ||= self.o_auth_client_secret o_auth_token ||= self.o_auth_token OAuthCCGCredentials.new(o_auth_client_id: o_auth_client_id, o_auth_client_secret: o_auth_client_secret, o_auth_token: o_auth_token) end |