Class: Sendable::Config
- Inherits:
-
Object
- Object
- Sendable::Config
- Defined in:
- lib/sendable/config.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #set_defaults ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
6 7 8 |
# File 'lib/sendable/config.rb', line 6 def initialize set_defaults end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
4 5 6 |
# File 'lib/sendable/config.rb', line 4 def api_key @api_key end |
#project_id ⇒ Object
Returns the value of attribute project_id.
3 4 5 |
# File 'lib/sendable/config.rb', line 3 def project_id @project_id end |
Instance Method Details
#set_defaults ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/sendable/config.rb', line 10 def set_defaults if ENV.has_key?("SENDABLE_PROJECT_ID") @project_id = ENV["SENDABLE_PROJECT_ID"] else @project_id = nil end if ENV.has_key?("SENDABLE_API_KEY") @api_key = ENV["SENDABLE_API_KEY"] else @api_key = "" end end |