Class: OneSignal::Rails::Plugin::Configuration
- Inherits:
-
Object
- Object
- OneSignal::Rails::Plugin::Configuration
- Defined in:
- lib/onesignal/rails/plugin.rb
Overview
Configuration options for the OneSignal plugin.
Instance Attribute Summary collapse
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#app_key ⇒ Object
Returns the value of attribute app_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.
41 42 43 |
# File 'lib/onesignal/rails/plugin.rb', line 41 def initialize set_defaults end |
Instance Attribute Details
#app_id ⇒ Object
Returns the value of attribute app_id.
39 40 41 |
# File 'lib/onesignal/rails/plugin.rb', line 39 def app_id @app_id end |
#app_key ⇒ Object
Returns the value of attribute app_key.
39 40 41 |
# File 'lib/onesignal/rails/plugin.rb', line 39 def app_key @app_key end |
Instance Method Details
#set_defaults ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/onesignal/rails/plugin.rb', line 45 def set_defaults @app_key = if ENV.key?('ONESIGNAL_APP_KEY') ENV['ONESIGNAL_APP_KEY'] else '' end @app_id = if ENV.key?('ONESIGNAL_APP_ID') ENV['ONESIGNAL_APP_ID'] else '' end end |