Class: ApacheCrunch::StringToken
- Inherits:
-
FormatToken
- Object
- FormatToken
- ApacheCrunch::StringToken
- Defined in:
- lib/format_token.rb
Overview
A bare string in a log format.
Instance Method Summary collapse
- #captured? ⇒ Boolean
- #derivation_rule ⇒ Object
- #name ⇒ Object
-
#populate!(string_value) ⇒ Object
Initializes the instance given the string it represents.
- #regex ⇒ Object
Instance Method Details
#captured? ⇒ Boolean
45 |
# File 'lib/format_token.rb', line 45 def captured?; false; end |
#derivation_rule ⇒ Object
46 |
# File 'lib/format_token.rb', line 46 def derivation_rule; NullDerivationRule.new; end |
#name ⇒ Object
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 |
#regex ⇒ Object
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 |