Class: OneSignal::Configuration
- Inherits:
-
Object
- Object
- OneSignal::Configuration
- Defined in:
- lib/onesignal/configuration.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_url ⇒ Object
Returns the value of attribute api_url.
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#active ⇒ Object
Returns the value of attribute active.
7 8 9 |
# File 'lib/onesignal/configuration.rb', line 7 def active @active end |
#api_key ⇒ Object
Returns the value of attribute api_key.
7 8 9 |
# File 'lib/onesignal/configuration.rb', line 7 def api_key @api_key end |
#api_url ⇒ Object
Returns the value of attribute api_url.
7 8 9 |
# File 'lib/onesignal/configuration.rb', line 7 def api_url @api_url end |
#app_id ⇒ Object
Returns the value of attribute app_id.
7 8 9 |
# File 'lib/onesignal/configuration.rb', line 7 def app_id @app_id end |
#logger ⇒ Object
Returns the value of attribute logger.
7 8 9 |
# File 'lib/onesignal/configuration.rb', line 7 def logger @logger end |