Class: CodeRay::WordList::CaseIgnoring

Inherits:
CodeRay::WordList show all
Defined in:
lib/coderay/helpers/word_list.rb

Overview

A CaseIgnoring WordList is like a WordList, only that keys are compared case-insensitively (normalizing keys using downcase).

Instance Method Summary collapse

Methods inherited from CodeRay::WordList

#add, #initialize

Constructor Details

This class inherits a constructor from CodeRay::WordList

Instance Method Details

#[](key) ⇒ Object



67
68
69
# File 'lib/coderay/helpers/word_list.rb', line 67

def [] key
  super key.downcase
end

#[]=(key, value) ⇒ Object



71
72
73
# File 'lib/coderay/helpers/word_list.rb', line 71

def []= key, value
  super key.downcase, value
end