Class Hash
In: lib/core_extensions.rb
Parent: Object

Methods

Public Instance methods

Assign value to all elements of hash

[Source]

# File lib/core_extensions.rb, line 88
    def assign_to_all(value)
        self.each_key do |key|
            self[key] = value
        end
    end

Convert hash keys to lowercase.

[Source]

# File lib/core_extensions.rb, line 78
    def downcase_keys
        result = {}
        self.each do |key, value|
            result[key.to_s.downcase] = value
        end

        result
    end

[Validate]