Class: RegexpExamples::CharGroup
- Inherits:
-
Object
- Object
- RegexpExamples::CharGroup
- Includes:
- GroupWithIgnoreCase, RandomResultBySample
- Defined in:
- lib/regexp-examples/groups.rb
Instance Attribute Summary
Attributes included from GroupWithIgnoreCase
Instance Method Summary collapse
-
#initialize(chars, ignorecase) ⇒ CharGroup
constructor
A new instance of CharGroup.
- #result ⇒ Object
Methods included from RandomResultBySample
Methods included from ForceLazyEnumerators
Constructor Details
#initialize(chars, ignorecase) ⇒ CharGroup
Returns a new instance of CharGroup.
80 81 82 83 |
# File 'lib/regexp-examples/groups.rb', line 80 def initialize(chars, ignorecase) @chars = chars @ignorecase = ignorecase end |
Instance Method Details
#result ⇒ Object
85 86 87 88 89 |
# File 'lib/regexp-examples/groups.rb', line 85 def result @chars.lazy.map do |result| GroupResult.new(result) end end |