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
Constructor Details
#initialize(chars, ignorecase) ⇒ CharGroup
Returns a new instance of CharGroup.
72 73 74 75 |
# File 'lib/regexp-examples/groups.rb', line 72 def initialize(chars, ignorecase) @chars = chars @ignorecase = ignorecase end |
Instance Method Details
#result ⇒ Object
77 78 79 80 81 |
# File 'lib/regexp-examples/groups.rb', line 77 def result @chars.map do |result| GroupResult.new(result) end end |