Class: Turbo::Train::BaseServer

Inherits:
Object
  • Object
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

#configurationObject (readonly)

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

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/turbo/train/base_server.rb', line 10

def publish(topics:, data:)
  raise NotImplementedError
end

#publish_urlObject



18
19
20
# File 'lib/turbo/train/base_server.rb', line 18

def publish_url
  server_config.publish_url
end

#server_configObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/turbo/train/base_server.rb', line 14

def server_config
  raise NotImplementedError
end