class RegexpExamples::PlaceHolderGroup

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!)

Public Instance Methods

result() click to toggle source
# File lib/regexp-examples/groups.rb, line 73
def result
  [GroupResult.new('')]
end