Class: CaseInsensitiveHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/failirc/extensions.rb

Direct Known Subclasses

ThreadSafeHash

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CaseInsensitiveHash

Returns a new instance of CaseInsensitiveHash.



43
44
45
# File 'lib/failirc/extensions.rb', line 43

def initialize (*args)
    super(*args)
end

Instance Method Details

#[](key) ⇒ Object



63
64
65
66
67
68
69
# File 'lib/failirc/extensions.rb', line 63

def [] (key)
    if key.class == String
        key = key.downcase
    end
    
    return ___get___(key)
end

#[]=(key, value) ⇒ Object



55
56
57
58
59
60
61
# File 'lib/failirc/extensions.rb', line 55

def []= (key, value)
    if key.class == String
        key = key.downcase
    end

    ___set___(key, value)
end

#delete(key) ⇒ Object



71
72
73
74
75
76
77
# File 'lib/failirc/extensions.rb', line 71

def delete (key)
    if key.class == String
        key = key.downcase
    end

    ___delete___(key)
end