Class: Sendable::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



5
6
7
# File 'lib/sendable/config.rb', line 5

def initialize
  set_defaults
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



3
4
5
# File 'lib/sendable/config.rb', line 3

def api_key
  @api_key
end

Instance Method Details

#set_defaultsObject



9
10
11
12
13
14
15
# File 'lib/sendable/config.rb', line 9

def set_defaults
  if ENV.has_key?("SENDABLE_API_KEY")
    @api_key = ENV["SENDABLE_API_KEY"]
  else
    @api_key = ""
  end
end