Class: CourierRails::Configuration
- Inherits:
-
Object
- Object
- CourierRails::Configuration
- Defined in:
- lib/courier_rails.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
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.
25 26 27 |
# File 'lib/courier_rails.rb', line 25 def initialize set_defaults end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
23 24 25 |
# File 'lib/courier_rails.rb', line 23 def api_key @api_key end |
Instance Method Details
#set_defaults ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/courier_rails.rb', line 29 def set_defaults @api_key = if ENV.has_key?("COURIER_AUTH_TOKEN") ENV["COURIER_AUTH_TOKEN"] else "" end end |