Class: ApacheCrunch::RegexToken

Inherits:
FormatToken show all
Defined in:
lib/format_token.rb

Overview

A token based on an arbitrary regular expression.

Instance Method Summary collapse

Instance Method Details

#captured?Boolean

Returns:

  • (Boolean)


77
# File 'lib/format_token.rb', line 77

def captured?; true; end

#derivation_ruleObject



78
# File 'lib/format_token.rb', line 78

def derivation_rule; NullDerivationRule.new; end

#nameObject



75
# File 'lib/format_token.rb', line 75

def name; @_name; end

#populate!(regex_name, regex_text) ⇒ Object



70
71
72
73
# File 'lib/format_token.rb', line 70

def populate!(regex_name, regex_text)
    @_name = "regex_#{regex_name}".to_sym
    @_regex = regex_text
end

#regexObject



76
# File 'lib/format_token.rb', line 76

def regex; @_regex; end