arin-rws 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. data/lib/arin-rws/network.rb +8 -2
  2. metadata +3 -3
@@ -17,8 +17,14 @@ module Arin
17
17
 
18
18
  @netblocks = []
19
19
  if not data['net']['netBlocks'].nil?
20
- # TODO Handle arrays
21
- @netblocks << Arin::RWS::NetBlock.new(data['net']['netBlocks']['netBlock'])
20
+ t = data['net']['netBlocks']['netBlock']
21
+ if t.instance_of? Array
22
+ t.each do |l|
23
+ @netblocks << Arin::RWS::NetBlock.new(l)
24
+ end
25
+ else
26
+ @netblocks << Arin::RWS::NetBlock.new(t)
27
+ end
22
28
  end
23
29
 
24
30
  #@origin_as = []
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arin-rws
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Thompson