Class: HyperSpec::CaseInsensitiveHash
- Inherits:
-
Hash
- Object
- Hash
- HyperSpec::CaseInsensitiveHash
- Defined in:
- lib/hyperspec.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_hash(hash) ⇒ Object
234 235 236 237 238 239 |
# File 'lib/hyperspec.rb', line 234 def self.from_hash(hash) hash.inject(new) do |m, (k, v)| m[k] = v.first m end end |
Instance Method Details
#[](key) ⇒ Object
245 246 247 |
# File 'lib/hyperspec.rb', line 245 def [](key) super(key.downcase) end |
#[]=(key, value) ⇒ Object
241 242 243 |
# File 'lib/hyperspec.rb', line 241 def []=(key, value) super(key.downcase, value) end |