sw_info 1.0.5 → 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.
- checksums.yaml +4 -4
 - data/lib/sw_info.rb +13 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b09907f5b8832f594eb13294938c238f4d774ce74d606c04aa3b45644f826d93
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 163888986368f462e4bfb51149c430e955bef9a3b99607b7ab56ba40fe6c2ae1
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: c93c49cb6e0253d36ee1d7a5e813e84ecaa8f420a6f6041c0542257688f784cdf6e31406f76a517d9c98d46f82cf70d4f79b59872de9415fbc6e21174ce9078a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: f6bacc8c512ef8b2b46a9069d8665fa60781477a502403db6191c55ca7e1deb90f43ddd1e6593fbc98b417edeb718dde7cff1dd537f43342c0303b0aeda2da7c
         
     | 
    
        data/lib/sw_info.rb
    CHANGED
    
    | 
         @@ -21,7 +21,7 @@ class Pal 
     | 
|
| 
       21 
21 
     | 
    
         
             
              attr_accessor :data
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
              def to_s
         
     | 
| 
       24 
     | 
    
         
            -
                 
     | 
| 
      
 24 
     | 
    
         
            +
                @data.map{ |k, v| "#{k}: #{v}"}.join(', ') + "\n"
         
     | 
| 
       25 
25 
     | 
    
         
             
              end
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
              def id
         
     | 
| 
         @@ -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
         
     |