Class: IonicNotification::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/ionic_notification/logger.rb

Instance Method Summary collapse

Instance Method Details

#empty_messageObject



13
14
15
16
# File 'lib/ionic_notification/logger.rb', line 13

def empty_message
  return unless available?
  ionic_logger "#{logger_label} WARNING! You tried to send a notification with empty message, but you wisely chose not to allow this practice."
end

#logger_labelObject



18
19
20
# File 'lib/ionic_notification/logger.rb', line 18

def logger_label
  "IonicNotification:"
end

#missing_device_tokensObject



8
9
10
11
# File 'lib/ionic_notification/logger.rb', line 8

def missing_device_tokens
  return unless available?
  ionic_logger "#{logger_label} This model does not respond to :device_tokens, did you run your migrations?"
end

#no_device_tokens(instance) ⇒ Object



3
4
5
6
# File 'lib/ionic_notification/logger.rb', line 3

def no_device_tokens(instance)
  return unless available?
  ionic_logger "#{logger_label} No device tokens were found for #{instance}, skipping."
end