demeler 1.0.4 → 1.0.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/CHANGELOG.md +4 -0
 - data/lib/demeler/version.rb +1 -1
 - data/lib/demeler.rb +15 -1
 - 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: 728592cb4a1c887e39d1fc9a66bc1e1d6a609538
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 3c37351fbb3c337e85d3121fa6f031b61524090b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 8c5d91aca641ac66bbda90b50488b88faae5d0cd0df1511d6d4ae5877c61a82c54aebcfc2cc5e350cd90aa9f9ab8a50a1f34a07088370a35076b6dc3e7e80ee0
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: ebe33bd9e0d9640a7eab8297bde1c133d6f1acd0a265c41f0ff284d338ab05c8e123b71f0eccbf9bf99ca9678fdbecca8f35c68dc0d20a38d4b63ad11946a81d
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/lib/demeler/version.rb
    CHANGED
    
    
    
        data/lib/demeler.rb
    CHANGED
    
    | 
         @@ -122,8 +122,22 @@ class Demeler 
     | 
|
| 
       122 
122 
     | 
    
         
             
                raise ArgumentError.new("In Demeler#alink, expected Hash for argument 2, opts") if !args.kind_of?(Hash)
         
     | 
| 
       123 
123 
     | 
    
         
             
                raise ArgumentError.new("In Demeler#alink, expected an href option in opts") if !args[:href]
         
     | 
| 
       124 
124 
     | 
    
         | 
| 
       125 
     | 
    
         
            -
                 
     | 
| 
      
 125 
     | 
    
         
            +
                # I had to use class.name because the Ruby case doesn't work
         
     | 
| 
      
 126 
     | 
    
         
            +
                # properly with comparing value.class with Symbol or String.
         
     | 
| 
      
 127 
     | 
    
         
            +
                # It was necessary to compare value.class.name with "Symbol" and "String".
         
     | 
| 
       126 
128 
     | 
    
         
             
                opts = args.clone
         
     | 
| 
      
 129 
     | 
    
         
            +
                value = opts.delete(:href)
         
     | 
| 
      
 130 
     | 
    
         
            +
                case value.class.name
         
     | 
| 
      
 131 
     | 
    
         
            +
                when "Symbol"
         
     | 
| 
      
 132 
     | 
    
         
            +
                  # convert to string
         
     | 
| 
      
 133 
     | 
    
         
            +
                  href = value.to_s
         
     | 
| 
      
 134 
     | 
    
         
            +
                when "String"
         
     | 
| 
      
 135 
     | 
    
         
            +
                  # clone string
         
     | 
| 
      
 136 
     | 
    
         
            +
                  href = String.new(value)
         
     | 
| 
      
 137 
     | 
    
         
            +
                else
         
     | 
| 
      
 138 
     | 
    
         
            +
                  href = value
         
     | 
| 
      
 139 
     | 
    
         
            +
                end
         
     | 
| 
      
 140 
     | 
    
         
            +
             
     | 
| 
       127 
141 
     | 
    
         
             
                if !parms.empty?
         
     | 
| 
       128 
142 
     | 
    
         
             
                  href << '?'
         
     | 
| 
       129 
143 
     | 
    
         
             
                  parms.each do |k,v|
         
     |