Class: TacviewClient::BaseProcessor
- Inherits:
-
Object
- Object
- TacviewClient::BaseProcessor
- Defined in:
- lib/tacview_client/base_processor.rb
Overview
An Base Procesor that defines all the methods called by an instance of a TacviewClient::Reader. Use this as a guide on what you need to implement. You can also optionally inherit from this class to make sure you have every method defined in your sub-class
Instance Method Summary collapse
-
#delete_object(object_id) ⇒ Object
Process a delete event for an object.
-
#set_property(property:, value:) ⇒ Object
Set a property.
-
#update_object(event) ⇒ Object
Process an update event for an object.
-
#update_time(time) ⇒ Object
Process a time update event.
Instance Method Details
#delete_object(object_id) ⇒ Object
Process a delete event for an object
34 35 36 |
# File 'lib/tacview_client/base_processor.rb', line 34 def delete_object(object_id) raise NotImplementedError, 'To be implemented by subclass' end |
#set_property(property:, value:) ⇒ Object
Set a property
50 51 52 |
# File 'lib/tacview_client/base_processor.rb', line 50 def set_property(property:, value:) raise NotImplementedError, 'To be implemented by subclass' end |
#update_object(event) ⇒ Object
Process an update event for an object
On the first appearance of the object there are usually more fields including pilot names, object type etc.
For existing objects these events are almost always lat/lon/alt updates only
26 27 28 |
# File 'lib/tacview_client/base_processor.rb', line 26 def update_object(event) raise NotImplementedError, 'To be implemented by subclass' end |
#update_time(time) ⇒ Object
Process a time update event
42 43 44 |
# File 'lib/tacview_client/base_processor.rb', line 42 def update_time(time) raise NotImplementedError, 'To be implemented by subclass' end |