Sha256: f10015a12e1c4e8f2ca3543e6b2c7ac59769f09160f0839b589f59a5095c3606

Contents?: true

Size: 120 Bytes

Versions: 12

Compression:

Stored size: 120 Bytes

Contents

class NilableHash < Hash
  def nilify_blanks
    keys.each do |k|
      self[k] = nil if self[k] == ''
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
brightbox-cli-1.1.0 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-1.0.0 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-1.0.0.rc2 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-1.0.0.rc1 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-0.18.1 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-0.18.0 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-0.17.5 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-0.17.4 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-0.17.3 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-0.17.2 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-0.17.1 lib/brightbox-cli/nilable_hash.rb
brightbox-cli-0.17.0 lib/brightbox-cli/nilable_hash.rb