Class: TextExtractor::Directives::CaptureGroup
- Defined in:
- lib/text_extractor/directives/group.rb
Overview
a line group that will be captured to a value
Instance Method Summary collapse
-
#initialize(name, *args) ⇒ CaptureGroup
constructor
A new instance of CaptureGroup.
- #join ⇒ Object
Methods inherited from Group
Constructor Details
#initialize(name, *args) ⇒ CaptureGroup
Returns a new instance of CaptureGroup.
49 50 51 52 |
# File 'lib/text_extractor/directives/group.rb', line 49 def initialize(name, *args) @name = name @lines = args end |
Instance Method Details
#join ⇒ Object
54 55 56 |
# File 'lib/text_extractor/directives/group.rb', line 54 def join ["(?<#{@name}>", *@lines, ')'] end |