sw_info 1.0.4 → 1.0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sw_info.rb +2 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad9210c3b37fa6604ae1df5bc4487d0033827e185d2e2b3195e98df7e34b0049
4
- data.tar.gz: 2a8036934c02bd6322e9454f410a11dac535d44dcf78ea8d776a42622289eb62
3
+ metadata.gz: 1ca4b798f74c5abdaf6ff658f5e1e82b1a49aa801925a85911f18a0478b92138
4
+ data.tar.gz: 2419a953ddfb997f3503af35d9f410d849f06974388200045e8af4b1379bcd73
5
5
  SHA512:
6
- metadata.gz: d1fa8308472c0226a3d5121d0916118affc935d6f150ce3903ed5888e0c35214e2cda4c30c8085c2bb56de975b273724b4e8c288ea7afa1b6f06beea13d3f545
7
- data.tar.gz: e3a00f6f4a86ac8a88b58d787751a84721fe78352c1d7472256f56435b0254e95b1901d2ece294f341893bc1f7ecef07d5e7ccd7990dbb162b71345449bdc220
6
+ metadata.gz: 82af48bd0443359a2a45925c049466ec80e25d1df7ce71145848b7e3fcc0e7183a05d3a5bdf513f203a7df496c658f6451c3fc7343c38501e3b2459176c3c878
7
+ data.tar.gz: 6a16b4f36092b50ff60be861c3d2cffb4baa2e4a087b504cdb7ba03eb546fd3a8feec5a7fb786affed57d17120e8e9215f513227da021edd2811703e0c0f8254
data/lib/sw_info.rb CHANGED
@@ -12,9 +12,6 @@ require 'debug'
12
12
  # https://github.com/ruby/debug
13
13
 
14
14
  # Cargo toda la data de swapi en la variable JSONDATA como hash
15
- # JSONDATA = JSON.load_file('./swapi.json').each_with_object({}) do |(key, value), hash|
16
- # hash[key] = value
17
- # end
18
15
 
19
16
  JSONDATA = File.expand_path('swapi.json', __dir__)
20
17
 
@@ -24,8 +21,7 @@ class Pal
24
21
  attr_accessor :data
25
22
 
26
23
  def to_s
27
- debugger
28
- name
24
+ @data.map{ |k, v| "#{k}: #{v}"}.join(', ') + "\n"
29
25
  end
30
26
 
31
27
  def id
@@ -190,6 +186,4 @@ class Vehicle < Pal
190
186
  def vehicle_class
191
187
  @data['vehicle_class']
192
188
  end
193
- end
194
-
195
- puts Person.search_for_id('people', 1).to_json
189
+ 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.4
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - EmilioD