Class: CommandTower::CredentialResolution::TwilioCredentials
- Inherits:
-
Object
- Object
- CommandTower::CredentialResolution::TwilioCredentials
- Defined in:
- lib/command_tower/credential_resolution/twilio_credentials.rb
Overview
Typed Twilio deployment credentials. Never log or serialize raw values.
Instance Attribute Summary collapse
-
#account_sid ⇒ Object
readonly
Returns the value of attribute account_sid.
-
#auth_token ⇒ Object
readonly
Returns the value of attribute auth_token.
Instance Method Summary collapse
- #available? ⇒ Boolean
-
#initialize(account_sid:, auth_token:) ⇒ TwilioCredentials
constructor
A new instance of TwilioCredentials.
- #inspect ⇒ Object (also: #pretty_inspect)
Constructor Details
#initialize(account_sid:, auth_token:) ⇒ TwilioCredentials
Returns a new instance of TwilioCredentials.
9 10 11 12 13 |
# File 'lib/command_tower/credential_resolution/twilio_credentials.rb', line 9 def initialize(account_sid:, auth_token:) @account_sid = account_sid.to_s.strip @auth_token = auth_token.to_s.strip freeze end |
Instance Attribute Details
#account_sid ⇒ Object (readonly)
Returns the value of attribute account_sid.
7 8 9 |
# File 'lib/command_tower/credential_resolution/twilio_credentials.rb', line 7 def account_sid @account_sid end |
#auth_token ⇒ Object (readonly)
Returns the value of attribute auth_token.
7 8 9 |
# File 'lib/command_tower/credential_resolution/twilio_credentials.rb', line 7 def auth_token @auth_token end |
Instance Method Details
#available? ⇒ Boolean
15 16 17 |
# File 'lib/command_tower/credential_resolution/twilio_credentials.rb', line 15 def available? account_sid.present? && auth_token.present? end |
#inspect ⇒ Object Also known as: pretty_inspect
19 20 21 |
# File 'lib/command_tower/credential_resolution/twilio_credentials.rb', line 19 def inspect "#<#{self.class.name} account_sid=[REDACTED] auth_token=[REDACTED] available?=#{available?}>" end |