Class: Adapter
- Inherits:
-
Object
- Object
- Adapter
- Includes:
- Logging
- Defined in:
- lib/business/adapter/adapter.rb
Overview
You must implement this class to adapt your data stream in our framework
Direct Known Subclasses
Constant Summary
Constants included from Logging
Instance Method Summary collapse
-
#connect_stream(stream = 1) ⇒ Object
Connects to a particular data stream.
-
#initialize ⇒ Adapter
constructor
Initializes the Adapter to run the logger.
-
#persist(status) ⇒ Object
Persist the status retrieved from the data stream.
Methods included from Logging
Constructor Details
#initialize ⇒ Adapter
Initializes the Adapter to run the logger
14 15 16 17 18 19 |
# File 'lib/business/adapter/adapter.rb', line 14 def initialize logger.fatal('The method initialize in Adapter must be implemented') raise 'This method must be implemented' end |
Instance Method Details
#connect_stream(stream = 1) ⇒ Object
Connects to a particular data stream
25 26 27 28 |
# File 'lib/business/adapter/adapter.rb', line 25 def connect_stream (stream=1) logger.fatal('The method connect_stream in Adapter must be implemented') raise 'This method must be implemented' end |
#persist(status) ⇒ Object
Persist the status retrieved from the data stream
34 35 36 37 |
# File 'lib/business/adapter/adapter.rb', line 34 def persist status logger.fatal('The method persist in Adapter must be implemented') raise 'This method must be implemented' end |