Class: MCLib::LogParser
- Inherits:
-
Object
- Object
- MCLib::LogParser
- Defined in:
- lib/mclib/log_parser.rb
Instance Method Summary collapse
-
#initialize ⇒ LogParser
constructor
A new instance of LogParser.
- #parse(line) ⇒ Object
Constructor Details
#initialize ⇒ LogParser
Returns a new instance of LogParser.
7 8 9 |
# File 'lib/mclib/log_parser.rb', line 7 def initialize @factory = MCLib::EventFactory.new end |
Instance Method Details
#parse(line) ⇒ Object
11 12 13 14 15 |
# File 'lib/mclib/log_parser.rb', line 11 def parse(line) , = split_data line type = type? @factory.build , , type end |