Sha256: 48cfb6d2759538a79e419cd83186faf43c2108d2545c332ccdadc1fa64d93243

Contents?: true

Size: 246 Bytes

Versions: 3

Compression:

Stored size: 246 Bytes

Contents

class Hash
  def append_value(key, val, delimiter=' ')
    self.dup[key] = [ self[key], val ].compact.join(delimiter)
  end
  
  def append_value!(key, val, delimiter=' ')
    self[key]     = [ self[key], val ].compact.join(delimiter)
  end  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
core_utilities-0.1.3 lib/core_utilities/core_ext/hash.rb
core_utilities-0.1.1 lib/core_utilities/core_ext/hash.rb
core_utilities-0.1.0 lib/core_utilities/core_ext/hash.rb