apple-news 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apple-news/components/text.rb +1 -1
- data/lib/apple-news/properties.rb +3 -0
- data/lib/apple-news/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89ec0ccf7598a2ab1c8b56db94edd41673e3cc9b
|
4
|
+
data.tar.gz: e1f700824645bd25cdc8c634cc4797f809220121
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e34c083dd32ef1b2f9c0281c7833599c1b387c6bef83f4dd366732c621042e0ff8300b331571ba6919527b26448d8248407e39da5b91256ea606fb0495b279fb
|
7
|
+
data.tar.gz: 06f0d6ef9f91c4a7c7766c662a6ba3d7bdb3162687ac80375aff791e16982d34d46f19f94826aa17397df1e195bc1efa40c2dd1aaab42d0747af48de17cb4577
|
@@ -11,7 +11,7 @@ module AppleNews
|
|
11
11
|
optional_property :animation, nil, Animation, :factory
|
12
12
|
optional_property :behavior, nil, Behavior, :factory
|
13
13
|
optional_property :inline_text_styles, [], Style::InlineText
|
14
|
-
optional_property :text_style, nil, Style::
|
14
|
+
optional_property :text_style, nil, Style::ComponentText
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -11,10 +11,13 @@ module AppleNews
|
|
11
11
|
self.class.properties.each do |prop, settings|
|
12
12
|
val = if !settings[:klass].nil?
|
13
13
|
assigned_val = opts.fetch(prop, settings[:default])
|
14
|
+
|
14
15
|
if settings[:default].is_a?(Array)
|
15
16
|
assigned_val.map { |v| settings[:klass].send(settings[:init_method], v) }
|
16
17
|
elsif settings[:default].is_a?(Hash)
|
17
18
|
Hash[assigned_val.map { |k, v| [k, settings[:klass].send(settings[:init_method], v)]}]
|
19
|
+
elsif !assigned_val.nil? && !assigned_val.is_a?(Class)
|
20
|
+
assigned_val
|
18
21
|
else
|
19
22
|
assigned_val.nil? ? nil : settings[:klass].send(settings[:init_method], assigned_val)
|
20
23
|
end
|
data/lib/apple-news/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apple-news
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan LeFevre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|