Class: TextExtractor::Directives::Maybe

Inherits:
Directive
  • Object
show all
Defined in:
lib/text_extractor/directives/classes.rb

Overview

current line or group occurs 0 or 1 times

Instance Attribute Summary

Attributes inherited from Directive

#state

Instance Method Summary collapse

Methods inherited from Directive

#initialize, #values

Constructor Details

This class inherits a constructor from TextExtractor::Directives::Directive

Instance Method Details

#callObject



76
77
78
# File 'lib/text_extractor/directives/classes.rb', line 76

def call
  state.current = ['(?:', state.current, ')?']
end