Module: RegexpExamples::GroupWithIgnoreCase
- Included in:
- CharGroup, SingleCharGroup
- Defined in:
- lib/regexp-examples/groups.rb
Instance Attribute Summary collapse
-
#ignorecase ⇒ Object
readonly
Returns the value of attribute ignorecase.
Instance Method Summary collapse
Instance Attribute Details
#ignorecase ⇒ Object (readonly)
Returns the value of attribute ignorecase.
27 28 29 |
# File 'lib/regexp-examples/groups.rb', line 27 def ignorecase @ignorecase end |
Instance Method Details
#result ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/regexp-examples/groups.rb', line 28 def result group_result = super if ignorecase group_result .concat( group_result.map(&:swapcase) ) .uniq else group_result end end |