Module: UmengPusher

Defined in:
lib/umeng_pusher.rb,
lib/umeng_pusher/sign.rb,
lib/umeng_pusher/client.rb,
lib/umeng_pusher/params.rb,
lib/umeng_pusher/version.rb,
lib/umeng_pusher/configuration.rb

Defined Under Namespace

Modules: Params Classes: Client, Configuration, Error, Sign

Constant Summary collapse

VERSION =
"0.1.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



10
11
12
# File 'lib/umeng_pusher.rb', line 10

def self.configuration
  @configuration ||= Configuration.new
end

Class Method Details

.app_master_secret(platform) ⇒ Object



29
30
31
# File 'lib/umeng_pusher.rb', line 29

def app_master_secret(platform)
  platform.downcase == 'ios' ? configuration.ios_app_master_secret : configuration.android_app_master_secret
end

.appkey(platform) ⇒ Object



25
26
27
# File 'lib/umeng_pusher.rb', line 25

def appkey(platform)
  platform.downcase == 'ios' ? configuration.ios_appkey : configuration.android_appkey
end

.configure {|configuration| ... } ⇒ Object

Yields:



21
22
23
# File 'lib/umeng_pusher.rb', line 21

def configure
  yield(configuration)
end

.production_modeObject



33
34
35
# File 'lib/umeng_pusher.rb', line 33

def production_mode
  configuration.production_mode
end