moromi-apns 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moromi/apns/message/base.rb +4 -3
- data/lib/moromi/apns/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32190ab275e62ad14f3f38abc9628f7582c448e1
|
4
|
+
data.tar.gz: 41a4f27cc3d6be7e81505191af8c4fdd0420b494
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73c6b4c57555334df2c230a7e1512fd98999cb0111a09960d18b8f89befdebb8ac4789e8be5e87219dc63e3a416a526d7fede048a1d479ccd3d0d9f2bb3c15af
|
7
|
+
data.tar.gz: 95b2bc3fa6bcac3bcef117d9b34781c2edd34bb5d3ff0703171c27bd3fe778d52780da9375f35ea193a0ee5e08a20e8c4ca8c45e9c68da2b6945162069b9dbb0
|
@@ -9,12 +9,13 @@ module Moromi::Apns::Message
|
|
9
9
|
def_delegators :@parameter, :alert, :badge, :sound, :content_available, :mutable_content, :category, :priority
|
10
10
|
|
11
11
|
# @param [Moromi::Apns::Parameter] parameter
|
12
|
-
def initialize(parameter:)
|
12
|
+
def initialize(parameter:, type: nil)
|
13
13
|
@parameter = parameter
|
14
|
+
@type = type
|
14
15
|
end
|
15
16
|
|
16
17
|
def type
|
17
|
-
self.class.name
|
18
|
+
type || self.class.name
|
18
19
|
end
|
19
20
|
|
20
21
|
def custom_data
|
@@ -45,7 +46,7 @@ module Moromi::Apns::Message
|
|
45
46
|
# @param [Hash] params
|
46
47
|
def self.unserialize(params)
|
47
48
|
parameter = ::Moromi::Apns::Parameter.unserialize(params[:parameter])
|
48
|
-
new(parameter: parameter)
|
49
|
+
new(parameter: parameter, type: params[:type])
|
49
50
|
end
|
50
51
|
end
|
51
52
|
end
|
data/lib/moromi/apns/version.rb
CHANGED