Class: RegexpExamples::SingleCharGroup
- Inherits:
-
Object
- Object
- RegexpExamples::SingleCharGroup
- Includes:
- GroupWithIgnoreCase, RandomResultBySample
- Defined in:
- lib/regexp-examples/groups.rb
Overview
The most “basic” possible group. For example, /x/ contains one SingleCharGroup
Instance Attribute Summary
Attributes included from GroupWithIgnoreCase
Instance Method Summary collapse
-
#initialize(char, ignorecase) ⇒ SingleCharGroup
constructor
A new instance of SingleCharGroup.
- #result ⇒ Object
Methods included from RandomResultBySample
Constructor Details
#initialize(char, ignorecase) ⇒ SingleCharGroup
Returns a new instance of SingleCharGroup.
57 58 59 60 |
# File 'lib/regexp-examples/groups.rb', line 57 def initialize(char, ignorecase) @char = char @ignorecase = ignorecase end |
Instance Method Details
#result ⇒ Object
62 63 64 |
# File 'lib/regexp-examples/groups.rb', line 62 def result [GroupResult.new(@char)] end |