Class: RegexpExamples::BackReferenceGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/regexp-examples/groups.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ BackReferenceGroup

Returns a new instance of BackReferenceGroup.



144
145
146
# File 'lib/regexp-examples/groups.rb', line 144

def initialize(id)
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



143
144
145
# File 'lib/regexp-examples/groups.rb', line 143

def id
  @id
end

Instance Method Details

#resultObject



148
149
150
# File 'lib/regexp-examples/groups.rb', line 148

def result
  [ GroupResult.new("__#{@id}__") ]
end