Class: CourierRails::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/courier_rails.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_keyObject

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_defaultsObject



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