Class: RegexpExamples::PlaceHolderGroup
- Inherits:
-
Object
- Object
- RegexpExamples::PlaceHolderGroup
- Includes:
- RandomResultBySample
- Defined in:
- lib/regexp-examples/groups.rb
Overview
Used as a workaround for when a group is expected to be returned, but there are no results for the group. i.e. PlaceHolderGroup.new.result == ” == SingleCharGroup.new(”).result (But using PlaceHolderGroup makes it clearer what the intention is!)
Instance Method Summary collapse
Methods included from RandomResultBySample
Instance Method Details
#result ⇒ Object
73 74 75 |
# File 'lib/regexp-examples/groups.rb', line 73 def result [GroupResult.new('')] end |