Class: AndroidServices::GoogleCloudMessaging::CloudMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/android_services/cloud_message/cloud_message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ CloudMessage

Returns a new instance of CloudMessage.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/android_services/cloud_message/cloud_message.rb', line 7

def initialize(options)
validating options
[ :registration_ids,
  :dry_run,
  :collapse_key,
  :data,
  :delay_while_idle,
  :time_to_live].each do |option|
    instance_variable_set("@#{option}", options[option])
  end
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/android_services/cloud_message/cloud_message.rb', line 4

def options
  @options
end

Instance Method Details

#send!Object



19
20
21
22
# File 'lib/android_services/cloud_message/cloud_message.rb', line 19

def send!
  build_request
  post_request!
end