arin-rws 0.0.2 → 0.0.3

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.
@@ -11,7 +11,7 @@ module Arin
11
11
  r = @@http.get("#{Arin::RWS::BASE_PATH}/#{resource}")
12
12
  result = JSON.parse(r.body)
13
13
 
14
- pp result
14
+ #pp result
15
15
 
16
16
  result
17
17
  end
@@ -27,8 +27,16 @@ module Arin
27
27
  # @origin_as.push(o['originAS']['$'])
28
28
  #end
29
29
 
30
+ @origin_as = []
30
31
  if not data['net']['originASes'].nil?
31
- @origin_as = data['net']['originASes']['originAS']['$']
32
+ t = data['net']['originASes']['originAS']
33
+ if t.instance_of? Array
34
+ t.each do |l|
35
+ @origin_as << l['$']
36
+ end
37
+ else
38
+ @origin_as << t['$']
39
+ end
32
40
  end
33
41
 
34
42
  if not data['net']['comment'].nil?
@@ -41,7 +49,7 @@ module Arin
41
49
  end
42
50
  else
43
51
 
44
- @commend = line['$']
52
+ @comment = line['$']
45
53
  end
46
54
  end
47
55
 
@@ -55,6 +63,10 @@ module Arin
55
63
 
56
64
  end
57
65
 
66
+ def net_blocks
67
+ @netblocks
68
+ end
69
+
58
70
  def origin_as
59
71
  @origin_as
60
72
  end
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Thompson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-26 00:00:00 Z
18
+ date: 2012-05-02 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: ARIN Restful Web Services