Class: HeyYou::Config::FcmPush
- Inherits:
-
Object
- Object
- HeyYou::Config::FcmPush
- Extended by:
- Configurable
- Defined in:
- lib/hey_you/config/fcm_push.rb
Constant Summary collapse
- REQUIRED_CONFIGS =
%i[credentials_file project_id]
Instance Attribute Summary collapse
-
#credentials_file ⇒ Object
Returns the value of attribute credentials_file.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
Instance Method Summary collapse
Instance Attribute Details
#credentials_file ⇒ Object
Returns the value of attribute credentials_file.
4 5 6 |
# File 'lib/hey_you/config/fcm_push.rb', line 4 def credentials_file @credentials_file end |
#project_id ⇒ Object
Returns the value of attribute project_id.
4 5 6 |
# File 'lib/hey_you/config/fcm_push.rb', line 4 def project_id @project_id end |
Instance Method Details
#validate_config ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/hey_you/config/fcm_push.rb', line 12 def validate_config @credentials_file = ENV[Google::Auth::CredentialsLoader::ENV_VAR] return if REQUIRED_CONFIGS.all? { |conf| send(conf) } raise( HeyYou::Config::Configurable::RequiredConfigsNotPassed, "You must pass all required config for channel `fcm_push`: #{REQUIRED_CONFIGS}" ) end |