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.
48 49 50 51 |
# File 'lib/text_extractor/directives/group.rb', line 48 def initialize(name, *args) @name = name @lines = args end |
Instance Method Details
#join ⇒ Object
53 54 55 |
# File 'lib/text_extractor/directives/group.rb', line 53 def join ["(?<#{@name}>", *@lines, ')'] end |