Class: RegexpExamples::SingleCharGroup
- Inherits:
-
Object
- Object
- RegexpExamples::SingleCharGroup
- Defined in:
- lib/regexp-examples/groups.rb
Instance Method Summary collapse
-
#initialize(char) ⇒ SingleCharGroup
constructor
A new instance of SingleCharGroup.
- #result ⇒ Object
Constructor Details
#initialize(char) ⇒ SingleCharGroup
Returns a new instance of SingleCharGroup.
22 23 24 |
# File 'lib/regexp-examples/groups.rb', line 22 def initialize(char) @char = char end |
Instance Method Details
#result ⇒ Object
25 26 27 |
# File 'lib/regexp-examples/groups.rb', line 25 def result [GroupResult.new(@char)] end |