Class: Turbo::Train::BaseServer
- Inherits:
-
Object
- Object
- Turbo::Train::BaseServer
show all
- Defined in:
- lib/turbo/train/base_server.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(configuration) ⇒ BaseServer
Returns a new instance of BaseServer.
6
7
8
|
# File 'lib/turbo/train/base_server.rb', line 6
def initialize(configuration)
@configuration = configuration
end
|
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
4
5
6
|
# File 'lib/turbo/train/base_server.rb', line 4
def configuration
@configuration
end
|
Instance Method Details
#listen_url(topic, **options) ⇒ Object
22
23
24
|
# File 'lib/turbo/train/base_server.rb', line 22
def listen_url(topic, **options)
server_config.listen_url(topic, **options)
end
|
#publish(topics:, data:) ⇒ Object
10
11
12
|
# File 'lib/turbo/train/base_server.rb', line 10
def publish(topics:, data:)
raise NotImplementedError
end
|
#publish_url ⇒ Object
18
19
20
|
# File 'lib/turbo/train/base_server.rb', line 18
def publish_url
server_config.publish_url
end
|
#server_config ⇒ Object
14
15
16
|
# File 'lib/turbo/train/base_server.rb', line 14
def server_config
raise NotImplementedError
end
|