class UniversalAccessLogParser::ElementGroup::Root

Attributes

skip_lines[R]

Public Class Methods

new(separator, &block) click to toggle source
# File lib/universal-access-log-parser.rb, line 56
def initialize(separator, &block)
        @skip_lines = []
        super(nil, separator, &block)
end

Public Instance Methods

names() click to toggle source
# File lib/universal-access-log-parser.rb, line 67
def names
        super << :other
end
parsers() click to toggle source
# File lib/universal-access-log-parser.rb, line 71
def parsers
        super << lambda{ |s|
                return nil if s.empty?
                s.sub(Regexp.new("^#{separator}"), '')
        }
end
regexp() click to toggle source
# File lib/universal-access-log-parser.rb, line 63
def regexp
        super + "(|#{separator}.*)"
end
skip_line(regexp) click to toggle source

root specific DSL

# File lib/universal-access-log-parser.rb, line 79
def skip_line(regexp)
        @skip_lines << regexp
end