familyapp_sdk 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cc54613088cf59e165ec38d1838a88158a1ee1f
|
4
|
+
data.tar.gz: 3788872368bbeb2606a01afd9d1269d2f19bab71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 651abf1f18d64af99f0e172e1846446ec5706ed182aae30eba61e76bc44ed096e343337163a6bb47c0d9925a26d19128b3d797e923096d8ca73f671f90da1a0f
|
7
|
+
data.tar.gz: 94758a428a88d529fa92090beb234af18f80def3f5f732c28f108801f3a2c858e500ab240676eef1df52f157c3adf3fb488739ed43e5906df202844d7707a86f
|
@@ -1,21 +1,24 @@
|
|
1
1
|
module FamilyappSdk
|
2
2
|
module Components
|
3
3
|
class Element
|
4
|
-
attr_accessor :
|
4
|
+
attr_accessor :title, :subtitle, :image, :url, :payload, :buttons
|
5
5
|
|
6
|
-
def initialize(
|
7
|
-
@type = type
|
6
|
+
def initialize(title:, subtitle: nil, image: nil, url: nil, payload: nil, buttons: nil)
|
8
7
|
@title = title
|
9
8
|
@subtitle = subtitle
|
10
9
|
@image = image
|
11
10
|
@url = url
|
12
11
|
@payload = payload
|
13
|
-
@buttons =
|
12
|
+
@buttons = build_attributes(buttons)
|
14
13
|
end
|
15
14
|
|
16
15
|
def build
|
17
16
|
instance_values.delete_if { |_attribute, value| value.nil? }
|
18
17
|
end
|
18
|
+
|
19
|
+
def build_attributes(attributes)
|
20
|
+
attributes.map(&:build) if attributes.present?
|
21
|
+
end
|
19
22
|
end
|
20
23
|
end
|
21
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: familyapp_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Familyapp API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|