Class: FluQ::Format::Base
- Inherits:
-
Object
- Object
- FluQ::Format::Base
- Extended by:
- Mixins::Loggable
- Includes:
- Mixins::Loggable
- Defined in:
- lib/fluq/format/base.rb
Class Method Summary collapse
-
.to_event(raw) ⇒ FluQ::Event
abstract
Event.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
abstract
A new instance of Base.
-
#parse(data) ⇒ Array<FluQ::Event>
abstract
Events.
Methods included from Mixins::Loggable
Constructor Details
#initialize(options = {}) ⇒ Base
This method is abstract.
initializer
Returns a new instance of Base.
13 14 15 |
# File 'lib/fluq/format/base.rb', line 13 def initialize( = {}) @options = end |
Class Method Details
.to_event(raw) ⇒ FluQ::Event
This method is abstract.
converter
Returns event.
8 9 |
# File 'lib/fluq/format/base.rb', line 8 def self.to_event(raw) end |
Instance Method Details
#parse(data) ⇒ Array<FluQ::Event>
This method is abstract.
parse data, return events
Returns events.
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/fluq/format/base.rb', line 20 def parse(data) events = [] parse_each(data) do |raw| if event = self.class.to_event(raw) events.push(event) true else false end end events end |