Class: ApacheCrunch::StringToken

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

Overview

A bare string in a log format.

Instance Method Summary collapse

Instance Method Details

#captured?Boolean

Returns:

  • (Boolean)


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

def captured?; false; end

#derivation_ruleObject



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

def derivation_rule; NullDerivationRule.new; end

#nameObject



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

def name; nil; end

#populate!(string_value) ⇒ Object

Initializes the instance given the string it represents



33
34
35
# File 'lib/format_token.rb', line 33

def populate!(string_value)
    @_string_value = string_value
end

#regexObject



39
40
41
42
43
# File 'lib/format_token.rb', line 39

def regex
    # Make sure there aren't any regex special characters in the string that will confuse
    # the parsing later.
    Regexp.escape(@_string_value)
end