sw_info 1.0.8 → 1.0.9

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sw_info.rb +12 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ca4b798f74c5abdaf6ff658f5e1e82b1a49aa801925a85911f18a0478b92138
4
- data.tar.gz: 2419a953ddfb997f3503af35d9f410d849f06974388200045e8af4b1379bcd73
3
+ metadata.gz: b09907f5b8832f594eb13294938c238f4d774ce74d606c04aa3b45644f826d93
4
+ data.tar.gz: 163888986368f462e4bfb51149c430e955bef9a3b99607b7ab56ba40fe6c2ae1
5
5
  SHA512:
6
- metadata.gz: 82af48bd0443359a2a45925c049466ec80e25d1df7ce71145848b7e3fcc0e7183a05d3a5bdf513f203a7df496c658f6451c3fc7343c38501e3b2459176c3c878
7
- data.tar.gz: 6a16b4f36092b50ff60be861c3d2cffb4baa2e4a087b504cdb7ba03eb546fd3a8feec5a7fb786affed57d17120e8e9215f513227da021edd2811703e0c0f8254
6
+ metadata.gz: c93c49cb6e0253d36ee1d7a5e813e84ecaa8f420a6f6041c0542257688f784cdf6e31406f76a517d9c98d46f82cf70d4f79b59872de9415fbc6e21174ce9078a
7
+ data.tar.gz: f6bacc8c512ef8b2b46a9069d8665fa60781477a502403db6191c55ca7e1deb90f43ddd1e6593fbc98b417edeb718dde7cff1dd537f43342c0303b0aeda2da7c
data/lib/sw_info.rb CHANGED
@@ -55,6 +55,10 @@ end
55
55
  class Person < Pal
56
56
  attr_accessor :data, :alias
57
57
 
58
+ def self.search_for_id(id)
59
+ super('people', id)
60
+ end
61
+
58
62
  def birth_year
59
63
  @data['birth_year']
60
64
  end
@@ -87,6 +91,10 @@ end
87
91
  class Starship < Pal
88
92
  attr_accessor :data
89
93
 
94
+ def self.search_for_id(id)
95
+ super('starships', id)
96
+ end
97
+
90
98
  def starships
91
99
  @data['starships']
92
100
  end
@@ -143,6 +151,10 @@ end
143
151
  class Vehicle < Pal
144
152
  attr_accessor :data
145
153
 
154
+ def self.search_for_id(id)
155
+ super('vehicles', id)
156
+ end
157
+
146
158
  def vehicles
147
159
  @data['vehicles']
148
160
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sw_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - EmilioD