hash_order_helper 0.1.4 → 0.1.5
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/README.md +1 -2
 - data/hash_order_helper.gemspec +1 -1
 - data/lib/hash_order_helper.rb +2 -10
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: fed8045b5b231e00e1742953907a8fe93a066ad7
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f4c57105accbd38c51f3836b867e43dc60861660
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: bc5b033d200678648b8a4644e8bf013d96e7775ed83e336c2e14b07cea972661eeece581899c350cdef33310e07462c51e77da8a37af4e9d35e9ea0bdeb4d92d
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: e51b1881becb9f6d4c0781bf52d96bfa77844a021a1c65ab10f6199ecc5c823461880906c14b3c4f9644ac7f757f525c9a7392c7d1777dfe8142b5b972756773
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -46,12 +46,11 @@ The following methods are added: 
     | 
|
| 
       46 
46 
     | 
    
         
             
            * `last(n) -> Array`
         
     | 
| 
       47 
47 
     | 
    
         
             
            * `pop -> Array`
         
     | 
| 
       48 
48 
     | 
    
         
             
            * `pop(n) -> Array` (alias: `<<`)
         
     | 
| 
       49 
     | 
    
         
            -
            * `nd_push(hash) -> Hash` **non-destructive** (alias:  
     | 
| 
      
 49 
     | 
    
         
            +
            * `nd_push(hash) -> Hash` **non-destructive** (alias: `+`)
         
     | 
| 
       50 
50 
     | 
    
         
             
            * `push(hash) -> Hash`
         
     | 
| 
       51 
51 
     | 
    
         
             
            * `nd_unshift(hash) -> Hash` **non-destructive**
         
     | 
| 
       52 
52 
     | 
    
         
             
            * `unshift(hash) -> Hash`
         
     | 
| 
       53 
53 
     | 
    
         
             
            * `>>(receiver_hash) -> Hash`
         
     | 
| 
       54 
     | 
    
         
            -
            * `>(receiver_hash) -> Hash` **non-destructive**
         
     | 
| 
       55 
54 
     | 
    
         | 
| 
       56 
55 
     | 
    
         
             
            ### `>>` method
         
     | 
| 
       57 
56 
     | 
    
         | 
    
        data/hash_order_helper.gemspec
    CHANGED
    
    
    
        data/lib/hash_order_helper.rb
    CHANGED
    
    | 
         @@ -76,7 +76,7 @@ module HashOrderHelper 
     | 
|
| 
       76 
76 
     | 
    
         | 
| 
       77 
77 
     | 
    
         
             
                new_hash
         
     | 
| 
       78 
78 
     | 
    
         
             
              end
         
     | 
| 
       79 
     | 
    
         
            -
              alias  
     | 
| 
      
 79 
     | 
    
         
            +
              alias + nd_push
         
     | 
| 
       80 
80 
     | 
    
         | 
| 
       81 
81 
     | 
    
         
             
              def push(push_hash)
         
     | 
| 
       82 
82 
     | 
    
         
             
                new_hash = nd_push(push_hash)
         
     | 
| 
         @@ -109,13 +109,5 @@ module HashOrderHelper 
     | 
|
| 
       109 
109 
     | 
    
         | 
| 
       110 
110 
     | 
    
         
             
                receiver.unshift(self)
         
     | 
| 
       111 
111 
     | 
    
         
             
              end
         
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
              def >(receiver)
         
     | 
| 
       114 
     | 
    
         
            -
                unless receiver.is_a?(Hash)
         
     | 
| 
       115 
     | 
    
         
            -
                  raise TypeError, "no implicit conversion of #{receiver.inspect}:#{receiver.class} into Hash"
         
     | 
| 
       116 
     | 
    
         
            -
                end
         
     | 
| 
       117 
     | 
    
         
            -
             
     | 
| 
       118 
     | 
    
         
            -
                receiver.nd_unshift(self)
         
     | 
| 
       119 
     | 
    
         
            -
              end
         
     | 
| 
       120 
112 
     | 
    
         
             
            end
         
     | 
| 
       121 
     | 
    
         
            -
            Hash.send(: 
     | 
| 
      
 113 
     | 
    
         
            +
            Hash.send(:include, HashOrderHelper)
         
     |