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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d4c2accd3a83c76997106e65005ca440498773b
4
- data.tar.gz: f10b56d9b207b1f495b8cecd7dbc8921e9301077
3
+ metadata.gz: 89ec0ccf7598a2ab1c8b56db94edd41673e3cc9b
4
+ data.tar.gz: e1f700824645bd25cdc8c634cc4797f809220121
5
5
  SHA512:
6
- metadata.gz: 5ab67e0d195a10ed907963461796342f0d2cbee21a41afc230d7077e6422502d162e7bf0c169c05aecb9cc570f026c725a8557bb776abdfec8ef78dcc14ddd00
7
- data.tar.gz: 856cc6fab4feae7ea0cafc6555be23406f3315a61eada4fa3434af9a340ea18cc38add94ddd4b324a6d7daeb1a8068455362d79c17aeee196bf9c82d83700de0
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::Text
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
@@ -1,3 +1,3 @@
1
1
  module AppleNews
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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.0
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-04-29 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler