royw-tmdb 0.0.2 → 0.1.0
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.
- data/VERSION.yml +2 -2
 - data/lib/object_extensions.rb +16 -11
 - metadata +2 -2
 
    
        data/VERSION.yml
    CHANGED
    
    
    
        data/lib/object_extensions.rb
    CHANGED
    
    | 
         @@ -1,19 +1,24 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # == Synopsis
         
     | 
| 
       2 
2 
     | 
    
         
             
            # add a blank? method to all Objects
         
     | 
| 
       3 
3 
     | 
    
         
             
            class Object
         
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
      
 4 
     | 
    
         
            +
              my_extension("blank?") do
         
     | 
| 
      
 5 
     | 
    
         
            +
                # return asserted if object is nil or empty
         
     | 
| 
      
 6 
     | 
    
         
            +
                def blank?
         
     | 
| 
      
 7 
     | 
    
         
            +
                  result = nil?
         
     | 
| 
      
 8 
     | 
    
         
            +
                  unless result
         
     | 
| 
      
 9 
     | 
    
         
            +
                    if respond_to? 'empty?'
         
     | 
| 
      
 10 
     | 
    
         
            +
                      if respond_to? 'strip'
         
     | 
| 
      
 11 
     | 
    
         
            +
                        result = strip.empty?
         
     | 
| 
      
 12 
     | 
    
         
            +
                      else
         
     | 
| 
      
 13 
     | 
    
         
            +
                        if respond_to? 'compact'
         
     | 
| 
      
 14 
     | 
    
         
            +
                          result = compact.empty?
         
     | 
| 
      
 15 
     | 
    
         
            +
                        else
         
     | 
| 
      
 16 
     | 
    
         
            +
                          result = empty?
         
     | 
| 
      
 17 
     | 
    
         
            +
                        end
         
     | 
| 
      
 18 
     | 
    
         
            +
                      end
         
     | 
| 
       14 
19 
     | 
    
         
             
                    end
         
     | 
| 
       15 
20 
     | 
    
         
             
                  end
         
     | 
| 
      
 21 
     | 
    
         
            +
                  result
         
     | 
| 
       16 
22 
     | 
    
         
             
                end
         
     | 
| 
       17 
     | 
    
         
            -
                result
         
     | 
| 
       18 
23 
     | 
    
         
             
              end
         
     | 
| 
       19 
24 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: royw-tmdb
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors: 
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Roy Wright
         
     | 
| 
         @@ -9,7 +9,7 @@ autorequire: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
            date: 2009-04- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2009-04-17 00:00:00 -07:00
         
     | 
| 
       13 
13 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       15 
15 
     | 
    
         |