Class: HeyYouFcmPush::MessageObject::FcmOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/hey_you_fcm_push/message_object/fcm_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(analytics_label:, link: nil, image: nil) ⇒ FcmOptions

Returns a new instance of FcmOptions.



6
7
8
9
10
11
12
# File 'lib/hey_you_fcm_push/message_object/fcm_options.rb', line 6

def initialize(analytics_label:, link: nil, image: nil)
  @to_h = {
    analytics_label: analytics_label,
    link: link,
    image: image
  }.compact
end

Instance Attribute Details

#to_hObject (readonly)

Returns the value of attribute to_h.



4
5
6
# File 'lib/hey_you_fcm_push/message_object/fcm_options.rb', line 4

def to_h
  @to_h
end