board-game-gem 0.2.7 → 0.2.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: e5304d3dcee4be10f7c0c9171a771ae914303921
4
- data.tar.gz: 1261a0bbb3f05a3eeb7b514d9bfcc4dbdda0c018
3
+ metadata.gz: d992e082ecbc6ba804153d4a436d77ce1ba97b4c
4
+ data.tar.gz: 2a7bc098550f61b8bd306931cc4dd960eb1a3573
5
5
  SHA512:
6
- metadata.gz: 9fa0d4aca8b223e5f0726a3f45ebbe779a6fe6e4b41f89f3439d6a073e2185bed22f9c9df771bf19115ba960996f5a8dc448e3bcc8c15900cd2cfb0b0b59771f
7
- data.tar.gz: fed27cfc69bd1bf7ec60cf89b13c456876c969218a0610719d7158225f3afbc27939458cb05a6aa601a8ba29724b66208a9abddfb473e3fa424403414e858eca
6
+ metadata.gz: 1af19a3020690d2c10d2a755f0a41bd72814aa36b74f0c4c4e287f97b69a3835a061bcaeab985b3d2104cf9c566b6f6c8ab0e16442ab8ae1a0039b47a83c2ba9
7
+ data.tar.gz: 7981c3e9766e03183e5d7e490cc39c76c13234f0705c1557472925bc776cb563615d92294ae86697d3255b0b8ddab2c1cbe88ec7e7d797e7a89624cc7d0f5c40
@@ -4,10 +4,15 @@ module BoardGameGem
4
4
  attr_reader :count, :items
5
5
 
6
6
  def initialize(xml)
7
- @count = get_integer(xml, "items", "totalitems")
8
- @items = []
9
- xml.css("item").each do |item|
10
- @items.push(BGGCollectionItem.new(item))
7
+ if !xml.nil?
8
+ @count = get_integer(xml, "items", "totalitems")
9
+ @items = []
10
+ xml.css("item").each do |item|
11
+ @items.push(BGGCollectionItem.new(item))
12
+ end
13
+ else
14
+ @count = -1
15
+ @items = []
11
16
  end
12
17
  end
13
18
 
@@ -1,3 +1,3 @@
1
1
  module BoardGameGem
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: board-game-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Roussel