Class: OneSignal::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
13
14
15
16
17
# File 'lib/onesignal/configuration.rb', line 9

def initialize
  @app_id = ENV['ONESIGNAL_APP_ID']
  @api_key = ENV['ONESIGNAL_API_KEY']
  @api_url = "https://onesignal.com/api/#{OneSignal::API_VERSION}"
  @active = true
  @logger = Logger.new(STDOUT).tap do |logger|
    logger.level = Logger::INFO
  end
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



7
8
9
# File 'lib/onesignal/configuration.rb', line 7

def active
  @active
end

#api_keyObject

Returns the value of attribute api_key.



7
8
9
# File 'lib/onesignal/configuration.rb', line 7

def api_key
  @api_key
end

#api_urlObject

Returns the value of attribute api_url.



7
8
9
# File 'lib/onesignal/configuration.rb', line 7

def api_url
  @api_url
end

#app_idObject

Returns the value of attribute app_id.



7
8
9
# File 'lib/onesignal/configuration.rb', line 7

def app_id
  @app_id
end

#loggerObject

Returns the value of attribute logger.



7
8
9
# File 'lib/onesignal/configuration.rb', line 7

def logger
  @logger
end