Class: Twilivery::Configuration
- Inherits:
-
Object
- Object
- Twilivery::Configuration
- Defined in:
- lib/twilivery.rb
Instance Attribute Summary collapse
-
#account_sid ⇒ Object
Returns the value of attribute account_sid.
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
-
#default_country_code ⇒ Object
Returns the value of attribute default_country_code.
-
#default_sms_sender ⇒ Object
Returns the value of attribute default_sms_sender.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #set_defaults ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
21 22 23 |
# File 'lib/twilivery.rb', line 21 def initialize set_defaults end |
Instance Attribute Details
#account_sid ⇒ Object
Returns the value of attribute account_sid.
16 17 18 |
# File 'lib/twilivery.rb', line 16 def account_sid @account_sid end |
#auth_token ⇒ Object
Returns the value of attribute auth_token.
17 18 19 |
# File 'lib/twilivery.rb', line 17 def auth_token @auth_token end |
#default_country_code ⇒ Object
Returns the value of attribute default_country_code.
19 20 21 |
# File 'lib/twilivery.rb', line 19 def default_country_code @default_country_code end |
#default_sms_sender ⇒ Object
Returns the value of attribute default_sms_sender.
18 19 20 |
# File 'lib/twilivery.rb', line 18 def default_sms_sender @default_sms_sender end |
Instance Method Details
#set_defaults ⇒ Object
25 26 27 28 29 30 |
# File 'lib/twilivery.rb', line 25 def set_defaults @account_sid = ENV.fetch('TWILIO_ACCOUNT_SID') { '' } @auth_token = ENV.fetch('TWILIO_AUTH_TOKEN') { nil } @default_sms_sender = ENV.fetch('TWILIO_SMS_SENDER') { nil } @default_country_code = ENV.fetch('TWILIO_COUNTRY_CODE') { nil } end |