Class: ApacheCrunch::FormatFactory
- Inherits:
-
Object
- Object
- ApacheCrunch::FormatFactory
- Defined in:
- lib/format.rb
Overview
Turns a string specifying an Apache log format into a Format instance
Class Method Summary collapse
-
.from_format_def(format_def) ⇒ Object
Constructs and returns a Format instance based on the given Apache log format string.
Class Method Details
.from_format_def(format_def) ⇒ Object
Constructs and returns a Format instance based on the given Apache log format string
77 78 79 80 81 82 83 84 |
# File 'lib/format.rb', line 77 def self.from_format_def(format_def) logformat = Format.new format_parser = FormatParser.new logformat.tokens = format_parser.parse_def(format_def) logformat end |